Wednesday, June 10, 2009

msbuild missing reference ,msbuild wrong build order

MSbuild incorrect Build order ?

MSbuild reference missing Dll's ?

when we come across these kind of situations , the probable reason could be that the build order in VS2008 is different from the build oder which msbuild uses.

VS uses a build order and passes the same to msbuild. BUt when u directly call msbuild to build, there could be difference in the build order of the projects.

To over come the missing references in Msbuild and Build order add the below section to the *.sln file.
ProjectSection(ProjectDependencies) = postProject section


if there is Project B which is referecning Project A , and if Project B gets built without A then add the below :

Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "projA", "ProjA.vsproj", "{AAAAAA-F34D-430J-7C4-12343545G}"

Project("{9BK9CEB8-123B-11DP-(8JU9-8989VC91BNJUI}") = "projB", "projB.vsproj", "{XY7HJ3D1-E2JU-41G7-HUA6-1E2556YUIA26}"
ProjectSection(ProjectDependencies) = postProject
{AAAAAA-F34D-430J-7C4-12343545G} = {AAAAAA-F34D-430J-7C4-12343545G}

No comments: