New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document <LangVersion> for csproj files #2821

Closed
BillWagner opened this Issue Aug 2, 2017 · 4 comments

Comments

@BillWagner
Member

BillWagner commented Aug 2, 2017

The C# build system now includes a node inside a csproj file that controls which version of C# the compiler should follow. Valid values include:

  • ISO-1
  • ISO-2
  • C# 3.0
  • C# 4.0
  • C# 5.0
  • C# 6.0
  • C# 7.0
  • C# 7.1 (beginning with .NET Core 2.0)
  • latest (latest minor version)
  • default (latest major version)

This can be set using the Visual Studio IDE, or editing the CSProj file.

@mairaw Can this be done with a dotnet CLI command?

@BillWagner BillWagner added this to the 2017 - Quarter 3 milestone Aug 2, 2017

@BillWagner BillWagner added this to Planned in .NET Core 2.0 Aug 3, 2017

@grokky1

This comment has been minimized.

Show comment
Hide comment
@grokky1

grokky1 Aug 21, 2017

@BillWagner Also please document:

Visual Studio has an option for language version with "C# latest major version (default)". Which I assume means "7.0" rather than "7.1" which is confusing because most advice in SO/blogs is to do nothing and get the latest and greatest automatically though msbuild defaults.

But actually, to get 7.1 I need to do <LangVersion>latest</LangVersion>.

grokky1 commented Aug 21, 2017

@BillWagner Also please document:

Visual Studio has an option for language version with "C# latest major version (default)". Which I assume means "7.0" rather than "7.1" which is confusing because most advice in SO/blogs is to do nothing and get the latest and greatest automatically though msbuild defaults.

But actually, to get 7.1 I need to do <LangVersion>latest</LangVersion>.

@mairaw

This comment has been minimized.

Show comment
Hide comment
@mairaw

mairaw Sep 5, 2017

Contributor

Might be done as part of #2642. The new topic for 7.1 already mentions this.

Contributor

mairaw commented Sep 5, 2017

Might be done as part of #2642. The new topic for 7.1 already mentions this.

@mairaw mairaw modified the milestones: Backlog, 2017 - Quarter 3 Sep 5, 2017

@mairaw

This comment has been minimized.

Show comment
Hide comment
@mairaw

mairaw Sep 5, 2017

Contributor

Also re. your question:

Can this be done with a dotnet CLI command?

I haven't seen that. Adding @livarcocc and @nguerrera to help with that.

Contributor

mairaw commented Sep 5, 2017

Also re. your question:

Can this be done with a dotnet CLI command?

I haven't seen that. Adding @livarcocc and @nguerrera to help with that.

@BillWagner BillWagner added the P1 label Mar 6, 2018

@mairaw mairaw removed this from Planned in .NET Core 2.0 Mar 22, 2018

@BillWagner BillWagner added this to TODO in C# 7.3 / VB 15.7 Mar 26, 2018

@BillWagner

This comment has been minimized.

Show comment
Hide comment
@BillWagner

BillWagner Apr 23, 2018

Member

One issue is to point out that you should select "all configurations", not just "debug" (which is the default).
This is a common pitfall, from the feedback so far.
So it would be great if we could include that in future instructions.

Member

BillWagner commented Apr 23, 2018

One issue is to point out that you should select "all configurations", not just "debug" (which is the default).
This is a common pitfall, from the feedback so far.
So it would be great if we could include that in future instructions.

@BillWagner BillWagner moved this from To do to Work In progress (WIP) in Sprint 136 (5/21/18 - 6/8/18) - Board View May 22, 2018

@BillWagner BillWagner referenced this issue May 23, 2018

Merged

more visibility to setting <LangVersion> #5571

2 of 2 tasks complete

@BillWagner BillWagner moved this from Work In progress (WIP) to In Review (PR -not Merged) in Sprint 136 (5/21/18 - 6/8/18) - Board View May 24, 2018

@BillWagner BillWagner moved this from TODO to In Review in C# 7.3 / VB 15.7 May 25, 2018

C# 7.3 / VB 15.7 automation moved this from In Review to Done May 29, 2018

Sprint 136 (5/21/18 - 6/8/18) - Board View automation moved this from In Review (PR -not Merged) to Done (Merged or Closed) May 29, 2018

@mairaw mairaw added the resolved label May 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment