This works with Continuous Integration and WebDeploy:
This problem occurs when I install
<MvcBuildViews>true</MvcBuildViews>
in my project file that I need .
After reading and testing everything that I found about this problem, I have wokraround, which also works with WebDeploy through MSBuild
MSBUild.exe ... /p:DeployOnBuild=true
You (only) need to delete the TransformWebConfig subfolder in your team folder during the events before and after the build. It works even with continuous integration servers that break if there is no folder
Pre-build event command line:
if exist "$(ProjectDir)obj\$(ConfigurationName)\transformwebconfig\" del "$(ProjectDir)obj\$(ConfigurationName)\transformwebconfig\*" /F /S /Q
Post-build event command line:
if exist "$(ProjectDir)obj\$(ConfigurationName)\transformwebconfig\" del "$(ProjectDir)obj\$(ConfigurationName)\transformwebconfig\*" /F /S /Q
This even works great with Resharper , which sometimes gets confused if you delete the entire obj folder.
Be sure to set the Run the post-build event parameter to always !!
UPDATE: Replaced debugging and release using $ (ConfigurationName) and removed the resulting duplicate line
Flynn Apr 10 '14 at 7:49 2014-04-10 07:49
source share