error LNK2038: mismatch detected for ‘_MSC_VER’: value ‘1600’ doesn’t match value ‘1700’ in CppFile1.obj

TL;DR; Recompile all your old static-linked .lib files with current-compiler (VS2012, in OP’s case). You are trying to link objects compiled by different versions of the compiler. That’s not supported in modern versions of VS, at least not if you are using the C++ standard library. Different versions of the standard library are binary incompatible … Read more

Running MSBuild fails to read SDKToolsPath

I couldn’t face putting Visual Studio on the build server. The SDK v7.0A is the SDK installed with Visual Studio 2010 (The A indicates this is a VS release). Since then, a newer version has been released. Microsoft Windows SDK for Windows 7 and .NET Framework AKA v7.1. I’ve installed this on my build server. … Read more

The CodeDom provider type “Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider” could not be located

If your project has Roslyn references and you are deploying it on an IIS server, you might get unwanted errors on the website as many hosting providers still have not upgraded their servers and hence do not support Roslyn. To resolve this issue, you will need to remove the Roslyn compiler from the project template. … Read more

NuGet behind a proxy

Here’s what I did to get this working with my corporate proxy that uses NTLM authentication. I downloaded NuGet.exe and then ran the following commands (which I found in the comments to this discussion on CodePlex): nuget.exe config -set http_proxy=http://my.proxy.address:port nuget.exe config -set http_proxy.user=mydomain\myUserName nuget.exe config -set http_proxy.password=mySuperSecretPassword This put the following in my NuGet.config … Read more

How to Publish Web with msbuild?

I got it mostly working without a custom msbuild script. Here are the relevant TeamCity build configuration settings: Artifact paths: %system.teamcity.build.workingDir%\MyProject\obj\Debug\Package\PackageTmp Type of runner: MSBuild (Runner for MSBuild files) Build file path: MyProject\MyProject.csproj Working directory: same as checkout directory MSBuild version: Microsoft .NET Framework 4.0 MSBuild ToolsVersion: 4.0 Run platform: x86 Targets: Package Command line … Read more