Skip to content
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

VB: language version flag 15.3 not properly passed to project system #19075

Closed
jcouv opened this issue Apr 28, 2017 · 9 comments
Closed

VB: language version flag 15.3 not properly passed to project system #19075

jcouv opened this issue Apr 28, 2017 · 9 comments
Assignees
Milestone

Comments

@jcouv
Copy link
Member

jcouv commented Apr 28, 2017

Repro:

  • Create a VB proj and set language version to 15.3 (in the proj file)
  • Type a tuple with inferred names and use the inferred names
  • If you build the project, it will build properly
  • But the IDE will show red squiggles (it is using language version Default)
@AdamSpeight2008
Copy link
Contributor

AdamSpeight2008 commented Apr 28, 2017

Default is tied to latest major release, 15.0.
How are you changing the language? Manually editing the actual .vbproj file?

@jcouv
Copy link
Member Author

jcouv commented Apr 28, 2017

From discussion with @srivatsn, only the new project system has a generic way of passing the whole command-line through.
The old project system has to go through the un-managed API (CVbcMSBuildHostObject::SetLanguageVersion). That method needs to convert from language version as a string ("15.3") to an enum value (VisualBasic15_3 = 1503 in this case).
Note: the corresponding method for Csc (CCscMSBuildHostObject::SetLangVersion) doesn't have that problem (it is just a pass-through).

@srivatsn It would be great if someone from your team could help with that. Thanks

FYI @jasonmalinowski

@jcouv
Copy link
Member Author

jcouv commented Apr 28, 2017

One more thing: while making this change, let's also make sure that language version "Latest" is passed properly (Latest = Integer.MaxValue, but it's probably better to pass the specific version, 1503).

@srivatsn
Copy link
Contributor

Can you file a bug in the project-system repo for this?

@jcouv
Copy link
Member Author

jcouv commented Apr 28, 2017

Issue moved to dotnet/project-system #2088 via ZenHub

@jcouv
Copy link
Member Author

jcouv commented Apr 29, 2017

Looks like we can fix this without project system change. Re-opening compiler issue.

@jcouv
Copy link
Member Author

jcouv commented May 6, 2017

Fixed by #19112

@jcouv jcouv closed this as completed May 6, 2017
@AdamSpeight2008
Copy link
Contributor

@jcouv Are you sure this is fixed as i am using 15.8.0 Preview 1.1 and it doesn't seem to be passing the language version.

@jcouv
Copy link
Member Author

jcouv commented May 18, 2018

@AdamSpeight2008 I tried it just now (Version 15.8.0 Preview 2.0 [27715.0.d15.8]) by creating a VB class library with .NET Framework, then using a VB 15.5 feature (non-trailing named arguments), manually setting the <LangVersion>15.5</LangVersion> in the project file, and it worked as expected.

If there is an issue that you can repro, please file it with details in the project-systems repo (consider linking to dotnet/project-system#3411 which was the most recently fixed issue regarding VB and LangVersion).
Thanks

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

No branches or pull requests

3 participants