Building with MSBuild 14.0/C# 6.0 in AppVeyor

Ufuk Hacıoğulları picture Ufuk Hacıoğulları · Aug 22, 2015 · Viewed 9.3k times · Source

I am trying build a library with C# 6.0 code in AppVeyor. I have tried configurations in this update from AppVeyor, this discussion and this blog post.

Here's what I did:

  • Select Visual Studio 2015 as operating system from AppVeyor web interface
  • Add MSBuild 14.0 folder to the path (tried both from web interface and appveyor.yml)

    SET PATH=C:\Program Files (x86)\MSBuild\14.0\Bin\;%PATH%
    
  • Changed these lines in solution file

    # Visual Studio 14
    VisualStudioVersion = 14.0.23107.0
    
  • Tried to invoke MSBuild with custom build script

None of these worked. It still picks up MSBuild 12.0 and fails. What else can I try? There are people who got it working, I can't see what I'm missing.

Answer

TravisEz13 picture TravisEz13 · Jun 5, 2016

In addition to what you tried above, you need to make sure you used the Visual Studio 2015 image.