Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Update to use the latest Roslyn version and add support for C# 7 #1046

Closed
danroth27 opened this issue Mar 3, 2017 · 10 comments
Closed

Update to use the latest Roslyn version and add support for C# 7 #1046

danroth27 opened this issue Mar 3, 2017 · 10 comments

Comments

@danroth27
Copy link
Member

No description provided.

@Eilon
Copy link
Member

Eilon commented Mar 14, 2017

Two main things to do:

  1. Reference the newer version of Roslyn
  2. Evaluate all new language features to see what works and what doesn't.
    • Even for things that work, need to add tests for new syntax features to make sure it never breaks.

@Eilon
Copy link
Member

Eilon commented Mar 14, 2017

Related issue w/ tuple syntax in generics: #1070

@NTaylorMullen
Copy link
Contributor

Evaluate all new language features to see what works and what doesn't.

Went through the features and they all parse correctly (yay!).

The work for this issue is then:

  1. Reference the newer version of Roslyn
  2. Add tests for C# 7 features

@rynowak
Copy link
Member

rynowak commented Mar 15, 2017

FYI checking this in is blocked right now on us having the right versions for our tooling to consume.

NTaylorMullen added a commit that referenced this issue Apr 13, 2017
- Added C# 7 test to validate questionable features work end-to-end.
- Had to add several explicit package references to let our VS specific packages work as expected.

#1046
NTaylorMullen added a commit that referenced this issue Apr 13, 2017
- Added C# 7 test to validate questionable features work end-to-end.
- Had to add several explicit package references to let our VS specific packages work as expected.

#1046
@rynowak rynowak removed the Evolution label Apr 14, 2017
NTaylorMullen added a commit that referenced this issue Apr 21, 2017
- Added C# 7 test to validate questionable features work end-to-end.
- Had to add several explicit package references to let our VS specific packages work as expected.

#1046
NTaylorMullen added a commit that referenced this issue Apr 21, 2017
- Added C# 7 test to validate questionable features work end-to-end.
- Had to add several explicit package references to let our VS specific packages work as expected.

#1046
@NTaylorMullen
Copy link
Contributor

1696e2a

@RehanSaeed
Copy link

Do we need to add <LangVersion>latest</LangVersion> or is this the default?

@rynowak
Copy link
Member

rynowak commented Jun 30, 2017

Yes, you need to set LangVersion. MVC uses your projects' settings for compilation

@jcouv
Copy link

jcouv commented Jul 4, 2017

@Eilon @NTaylorMullen @ryanbrandenburg Just a heads-up: we plan to release C# 7.1 along with Visual Studio 2017 version 15.3 (and C# 7.2 with version 15.5). My understanding is that ASP.NET Core and Razor don't need official updates for users to adopt those new versions of the compiler. I have instructions from Damian which I collected here.
What is your official adoption plan? Do you want me to ping you once nuget packages get published? Right now we have preview packages available.

Also, just to confirm, since I saw a discussion of LangVersion "latest" above: "latest" means latest minor version (7.0, 7.1, 7.2, 8.0, etc), whereas "default" means latest major (7.0, 8.0, etc). Most Visual Studio templates use "default" and we let people opt-into "latest". That avoids problems if different people on a team use different versions of Visual Studio 2017. What language version does ASP.NET Core project teamplates use? I'd recommend either specific version that gets ramped up, or "default".

@rynowak
Copy link
Member

rynowak commented Jul 4, 2017

What is your official adoption plan? Do you want me to ping you once nuget packages get published? Right now we have preview packages available.

There was a recent email thread about this - I've added you to that.

We ship a dependency on Roslyn which we use for runtime compilation. We will need to adopt your candidate (non-build number stamped) packages when they are available from myget, and sim-ship with you when we go to nuget.org. It sounds like the right folks are looped in on your side.


Regarding the templates, I believe ours are default. It seems weird that we'd want to break from the norm, but I'll start a discussion on our side about setting latest.

For Razor, it's our desire that runtime compilation should behave similarly to the rest of your project, so we want to get that information from the project compilation settings, and not hardcode anything.

@jcouv
Copy link

jcouv commented Jul 5, 2017

Sounds good. Just to clarify, I think "default" is good. I don't recommend changing to "latest".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants