I have a Silverlight solution that I want to create a build script for. I have a simple script that looks like this
call "c:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"
msbuild %CD%\V1\Incentive.sln /target:Rebuild /property:Configuration=DEBUG;WarningLevel=2
msbuild %CD%\UI\IncentiveUI.sln /target:Rebuild /property:Configuration=DEBUG;WarningLevel=2
pause
However when I run this I get a failure, with some complaints about classes that are in a project with linked files:
This solution compiles fine in VS2008 so I can’t figure out what the problem is. I have to guess something is wrong with the way I am using msbuild here.
To fix this I had to set the /target:Build instead of “Rebuild”. It appears as if Rebuild is cleaning out the build from the linked assembly and not correctly rebuilding them when it compiles the project that relies on this.