Skip to content

Instantly share code, notes, and snippets.

@slavikdev
Last active December 17, 2015 17:49
Show Gist options
  • Save slavikdev/5649267 to your computer and use it in GitHub Desktop.
Save slavikdev/5649267 to your computer and use it in GitHub Desktop.
Moving from VS 2008 to VS 2012 I had trouble with msbuild targets. This is easy solution is to set new v11 build targets when you're building on desktop machine and old v9 targets when build is run on a build server via command line. Put it into your .csproj file.
<Import
Condition="'$(IsDesktopBuild)' == 'true'"
Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v11.0\
WebApplications\Microsoft.WebApplication.targets" />
<Import
Condition="'$(IsDesktopBuild)' == 'false'"
Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\
WebApplications\Microsoft.WebApplication.targets" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment