Please use language version 7.2 or greater to allow non-trailing named arguments

Ohad Schneider's Avatar

Ohad Schneider

13 Oct, 2018 09:55 PM

Hi,

According to this thread, C# 7.2 should be supported.

However, I could not get it to work:
1. <LangVersion> specified as 'latest'
1. <LangVersion> specified as '7.2'
1. <LangVersion> specified as '7.3'

All result in the same error:

error CS1738: Named argument specifications must appear after all fixed arguments have been specified. Please use language version 7.2 or greater to allow non-trailing named arguments

For now I simply removed the offending qualifier, but I'd love to understand why I can't get it to work. My image is Visual Studio 2017.

Thanks,
Ohad

  1. Support Staff 1 Posted by Owen McDonnell on 14 Oct, 2018 05:56 AM

    Owen McDonnell's Avatar

    From this line, it looks like you're building "release" when the property condition in which you placed the <LangVersion> node specifies "debug"... or perhaps I am mistaken?

  2. 2 Posted by Ohad Schneider on 14 Oct, 2018 08:58 PM

    Ohad Schneider's Avatar

    You are not mistaken, I completely forgot that's how the VS UI works.
    It's working great now - thanks!

  3. Support Staff 3 Posted by Owen McDonnell on 20 Oct, 2018 01:27 AM

    Owen McDonnell's Avatar

    No problem.

  4. Owen McDonnell closed this discussion on 20 Oct, 2018 01:27 AM.

Comments are currently closed for this discussion. You can start a new one.

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