Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T.
There is a known problem with MSBuild whereby it does not cater for database project types as these project types (database projects) are not buildable.  This is only an issue when specifying a solution file (as the item to build) within the MSBuild script.
Because these are not buildable projects VS does not show them in the solution configuration manager.  Unfortunately this means they cannot be manually configured not to build (as a work around to this problem). 
When using solution files within MSBuild, it does not allow you to exclude specific projects.  There are a few options to work around this - as mentioned in this article:  http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=640825&SiteID=1
Another simple solution is to just remove the database project from the solution - and if you really want it still within the solution - just create another project of type class library and just reuse the original project's files.  By using another project type (like class library) you can use the configuration manager to explicitly flag this project not to build (remember to update each configuration).
This issue affects TFS continuous integration builds.
 
Posted on Tuesday, May 27, 2008 6:20 PM C# .NET , OS/Networking/Misc Apps , ASP.NET , Dev Env, TFS, MSBuild etc | Back to top


Comments on this post: MSBuild fails when building solutions with database projects

# re: MSBuild fails when building solutions with database projects
Requesting Gravatar...
I prefer to put my projects in an ItemGroup in the build script. That way I can exclude problem projects like Database projects, and I can build groups of projects together. This is important when any kind of code generation needs to take place.
Left by Chris Eargle on May 28, 2008 6:53 AM

# re: MSBuild fails when building solutions with database projects
Requesting Gravatar...
Hi , I do believe this is an excellent blog. I stumbled upon it on Yahoo , i will come back once again. Money and freedom is the best way to change, may you be rich and help other people.
Left by Split Testing on Sep 08, 2011 3:21 AM

# re: MSBuild fails when building solutions with database projects
Requesting Gravatar...
cheapbagshopping.com---wholesale cheap men and women clothing,bags,shoes,jewelries,accessories from China.www.cheapbagshopping.com
Left by Cheapbagshoppingcom on Dec 20, 2011 10:44 PM

Your comment:
 (will show your gravatar)


Copyright © Tim Huffam | Powered by: GeeksWithBlogs.net