We've got a MsBuild.proj file which contains the following section (simplified):
<Target Name="WEB" DependsOnTargets="CleanResults;UpdateAssemblyInfo;Services;Business">
<!-- Other build and release stuff -->
<MSBuild Projects="$(CreateInstallValuesScriptProjectFile)" Properties="DatabaseStructureLocation=$(DatabaseDirectory)\Sandbox\002.Structure" />
</Target>
Basically, the InstallValuesScript generates a .sql file in our databasedirectory, which will update the version of our application in the database. Fairly simple.
The build is called as such:
MSBuild msbuild.proj /m /t:WEB /p:Configuration=Release;DoRelease=true;DoSandBox=false;DoWix=false /fileLoggerParameters:LogFile=msbuild.log;Verbosity=normal;Encoding=UTF-8
However, what we're seeing is that the InstallValues section is called multiple times, and as a result this file is created a couple of times, and on different locations... Obviously when the build is compiled two or three times instead of only once, thats annoying but not really critical (just goes a bit slower), however for this Installvalues file, we really don't want multiple instances of it.
So what gives, can a target be called multiple times? Maybe caused by the compiling of a dependant assembly? Some light on this strange phenomenom would be highly appreciated.