Project using c#7.0 syntax (in-line out variables) won't build

David Bown's Avatar

David Bown

11 Jul, 2018 10:16 AM

Our private project https://ci.appveyor.com/project/collabco/myday-core-v3/ won't build when using c# 7.0 syntax. In this particular case in-line out variables. I've sen other posts but they generally resolve the matter by changing the image. We are using the "Visual Studio 2017" image in the build settings and are building .net 4.6.1 libraries.

We do not encounter the problem when building .net core libraries so i assume some how the project is using the wrong ms build version. How do we change this? The project builds fine on a local machine using Visual Studio 2017.

  1. 1 Posted by David Bown on 11 Jul, 2018 12:47 PM

    David Bown's Avatar

    We have just managed to resolve this issue. It appears the build is using MS Build v14.

    The issue appeared to because of the line in our appveyor pre-install script:
    set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%

    No on can remember why this line was added, it has been there a long time.

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