MSBuild Can’t Find Secondary References

That is right, you read the title correctly. MSBuild in versions 2005, 2008 and 2010 of VS does not find and include secondary references. This means that if you have a project Class Library that contains “Content” items that are supposed to copy to the bin, if you reference that assembly, MSBuild publish will not output those files into your website bin (don’t get confused with a Visual Studio Publish – that works fine still!).

What does this mean?

When grabbing output from Build Server under _PublishedWebsites (from the drop location, Releases), don’t expect to see this content in the bin. This makes auto-deployment scenario’s increasingly harder.

Microsoft’s recommended work around is to include that content item that is a secondary reference, directly in your Web application project…..LAME!

Information all found at these articles:

http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/b42c1097-463c-4f20-a171-f9b06d90617a/

http://sstjean.blogspot.com/2006/11/msbuild-cant-find-secondary-references.html

Leave a Reply