_PublishedWebsites does not exist?! WHAT?! Huh?
One of our TFS builds was succeeding and a fellow developer noticed that the Web App was not getting copied into the _PublishedWebsites folder of our drop location.
I took a look at our TFSBuild.Proj file and I didn’t see anything that stood out. I took a look at a similar project who’s output was being copied into the _PublishedWebsites directory and the .proj file matched that of the one that did not work.
Solution
The problem was not in the .proj file, but in the actual .csproj file for the Web Applicaiton Project.
.csproj files ARE MSBuild files and inside of that I saw this:
<Import Project=”$(MSBuildBinPath)\Microsoft.CSharp.targets” />
<!–<Import Project=”$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0WebApplications\Microsoft.WebApplication.targets” />–>
The second Build target file was not getting loaded.
This build target file contains a target by the name of “_CopyWebApplication” which takes the output of the web application and copies it to the _PublishedWebsites directory.
I uncommented this line, checked it back into TFS and re-ran my build and my _PublishedWebsites started showing up. ๐
My file now looks like this:
<Import Project=”$(MSBuildBinPath)\Microsoft.CSharp.targets” />
<Import Project=”$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0WebApplications\Microsoft.WebApplication.targets” />
Chudson121 says
In visual studio 2008, i had to add this line if you created a class library and then added a web app
<Import Project=”$(MSBuildExtensionsPath)MicrosoftVisualStudiov9.0WebApplicationsMicrosoft.WebApplication.targets” />