c# 6

chris.dostert's Avatar

chris.dostert

25 Jan, 2015 08:59 AM

Is there currently any way to enable c# 6?
My project (which utilizes c# 6 syntax) which compiles fine in visual studio 14 fails in appveyor

  1. 1 Posted by Jérémie Bertran... on 25 Jan, 2015 03:19 PM

    Jérémie Bertrand's Avatar

    Have you tried to use the Visual Studio 2015 CTP OS like described in this blog post:
    http://www.appveyor.com/blog/2015/01/20/visual-studio-2015-ctp-image
    I think this could be the issue.

  2. 2 Posted by chris.dostert on 25 Jan, 2015 11:07 PM

    chris.dostert's Avatar

    That is a start but I still can't get the build to use msbuild 14; it keeps trying to use 12.

    the part about "Add this command to install section of your build config if you need msbuild command to call MSBuild 14.0 by default:

    set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%"

    doesn't seem to have any effect

  3. 3 Posted by chris.dostert on 25 Jan, 2015 11:20 PM

    chris.dostert's Avatar

    An update; I got it to work by changing from msbuild to build script as follows: msbuild "Src\TW.CommentSubsystem.Core.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

    Maybe the msbuild task ise hardcoded to use version 12?

  4. Support Staff 4 Posted by Feodor Fitsner on 25 Jan, 2015 11:34 PM

    Feodor Fitsner's Avatar

    It takes Visual Studio version from .sln file. If it's VS 2013 then MSBuild 12.0 is used.

  5. 5 Posted by chris.dostert on 26 Jan, 2015 12:20 AM

    chris.dostert's Avatar

    I deleted/recreated the .sln inside visual studio 2015 and that resulted in a .sln file looking like "Microsoft Visual Studio Solution File, Format Version 12.00
    # Visual Studio 14
    VisualStudioVersion = 14.0.22512.0
    MinimumVisualStudioVersion = 10.0.40219.1 [...]"

    after checking this in it still was built with msbuild 12

    Just for fun I also tried manually editing the "Format Version" to 14 but no cigar either.

  6. Support Staff 6 Posted by Feodor Fitsner on 26 Jan, 2015 01:47 AM

    Feodor Fitsner's Avatar

    Then leave "script" build mode for now. We'll add VS 2015 support to support automatic "MSBuild" build mode.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac