MSBuild overwriting web.config with non-root project
We recently switched to CruiseControl (from TFS Build), executing MSBuild to build several ASP.Net web applications.  In a couple of instances, we have webservice projects included in the solution; while there's no code dependency, we find it handy to have the code in the solution for debug purposes.  

The problem is that the web.config from the web application is being properly generated and copies to the _PublishedWebSites folder, only to be overwritten by the web.config from the webservice project.  

Here's the MSBuild block:

		<msbuild>
			<executable>$(MSBuildExecutable)</executable>
			<workingDirectory>$(WorkingDirectoryBase)$(ProjectName)$(AppFolder)</workingDirectory>
			<projectFile>$(ProjectFile)</projectFile>
			<buildArgs>/p:OutDir=$(BuildOutDirBase)$(ProjectName)\$(AppName)\ /p:WebProjectOutputDir=$(BuildWebProjectOutputDirBase)$(ProjectName)\$(AppName)\</buildArgs>
			<targets>Build</targets>
			<timeout>900</timeout>
			<logger>ThoughtWorks.CruiseControl.MsBuild.XmlLogger,C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger> 
		</msbuild>

My theory is that because our webservice projects are not dependencies, and because they are alphabetically lower in the build order, they get built and copied last.  

Note that we're not using webdeploy projects--we just build to the _PublishedWebSites folder and use robocopy to deploy to our development (and test) IIS folders.

Thanks in advance for help and advice!
MSBuild overwriting web.config with non-root project
===

We recently switched to CruiseControl (from TFS Build), executing MSBuild to build several ASP.Net web applications.  In a couple of instances, we have webservice projects included in the solution; while there's no code dependency, we find it handy to have the code in the solution for debug purposes.  

The problem is that the web.config from the web application is being properly generated and copies to the _PublishedWebSites folder, only to be overwritten by the web.config from the webservice project.  

Here's the MSBuild block:

		<msbuild>
			<executable>$(MSBuildExecutable)</executable>
			<workingDirectory>$(WorkingDirectoryBase)$(ProjectName)$(AppFolder)</workingDirectory>
			<projectFile>$(ProjectFile)</projectFile>
			<buildArgs>/p:OutDir=$(BuildOutDirBase)$(ProjectName)\$(AppName)\ /p:WebProjectOutputDir=$(BuildWebProjectOutputDirBase)$(ProjectName)\$(AppName)\</buildArgs>
			<targets>Build</targets>
			<timeout>900</timeout>
			<logger>ThoughtWorks.CruiseControl.MsBuild.XmlLogger,C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger> 
		</msbuild>

My theory is that because our webservice projects are not dependencies, and because they are alphabetically lower in the build order, they get built and copied last.  

Note that we're not using webdeploy projects--we just build to the _PublishedWebSites folder and use robocopy to deploy to our development (and test) IIS folders.

Thanks in advance for help and advice!