Lately I’m playing a lot with TFS and at the moment I’m porting a NAnt deploy script over to TFSBuild with MsBuild.

Our project includes a few linked files, and in the drop location we found out that the folder structure is not what we were expecting: instead of having the linked files deployed to the correct location, they were copied in their original location.

Googling around we (a blog-less colleague and I) found a very nice post that explains were the problem lies (a bug in the target named _CopyWebApplication inside the Microsoft.WebApplication.targets file) and a solution for it.

The solution is overriding the default target with one that doesn’t copy linked files and add another target that only deals with linked files.

For the workaround and a better explanation of the problem read the original post: Using Linked Files with Web Application Projects.

There is also a bug opened in Connect: let’s see if it’s a bug or a “unsupported feature”.

Technorati Tags: ,