Thursday, July 12, 2018

VS 2017 Publishing .NET Core App with C# 7.1 Language version

I'm unable to publish a .NET Core console application that uses C# 7.1 in Visual Studio 2017. I need it because I'm using an async Main method.

When using the Publish function, I get an error complaining about the async method. It is attempting to compile the app using C# 7.0.

I found a few posts suggesting to add <LangVersion>latest</LangVersion> to the pubxml file but I still get the same error every time, even with that line added.

Any ideas?

VS 2017 Publishing .NET Core App with C# 7.1 Language version Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team