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

Make UpgradeProject work for VB #3141

Open
jinujoseph opened this issue Jan 13, 2018 · 12 comments
Open

Make UpgradeProject work for VB #3141

jinujoseph opened this issue Jan 13, 2018 · 12 comments
Assignees
Labels
Feature-Legacy-Application-Designer The "Application Designer" otherwise known as the legacy project properties Legacy Issues against the legacy project system. Triage-Approved Reviewed and prioritized
Milestone

Comments

@jinujoseph
Copy link
Contributor

The driving scenario is tuple inferred names (#18374) (VB 15.3).

Update: also VB 15.5 features.

ported from dotnet/roslyn#18694

@Pilchie Pilchie added Feature Request Legacy Issues against the legacy project system. Feature-Legacy-Application-Designer The "Application Designer" otherwise known as the legacy project properties labels Jan 16, 2018
@Pilchie Pilchie self-assigned this Jan 16, 2018
@Pilchie Pilchie added this to the Unknown milestone Jan 16, 2018
@jcouv
Copy link
Member

jcouv commented Feb 14, 2018

We need to confirm with @KathleenDollard, but last I heard this was holding back announcing features released in VB point releases.
I'm hoping we can schedule this for 16.0 at least (along with related change for warning versions, tracked by dotnet/roslyn#1580).

@jcouv
Copy link
Member

jcouv commented Feb 20, 2018

Tagging @KathleenDollard

@paul1956
Copy link

@KathleenDollard not sure this is the right place to address this but why doesn't the latest VS version automatically set the compiler version to the latest? VS 2017.7.5 with VB 15.5 set VB compiler version to 15 not 15.5.

@jcouv
Copy link
Member

jcouv commented Jul 31, 2018

@paul1956 The default project setting (which most people keep, since it's the default) is LangVersion = default. That means "latest major version".
If you want to change your project to use the "latest minor version", use LangVersion = latest.

@paul1956
Copy link

@jcouv I don't see default or latest or anything else a user can set. I know there is "plan" to allow users to set this in the IDE, but can you verify that "default" is actually stored somewhere? Or is the lack of anything stored just giving me "Default" and this unexpected behavior.

@jcouv
Copy link
Member

jcouv commented Jul 31, 2018

If LangVersion doesn't appear in the project file, you can check its effective value by running msbuild with option '/bl' (which produces a binary/structured log, see "msbuild structured log viewer").
As I said, "default" is the default and it means "latest major version". That should answer your earlier question.
If the property isn't explicit in the file, then to modify it, you must add it.

@jjmew jjmew added Triage-Approved Reviewed and prioritized and removed Triage-Approved Reviewed and prioritized labels Jan 14, 2019
@jjmew
Copy link
Contributor

jjmew commented Mar 19, 2019

This is tracked internally in https://dev.azure.com/devdiv/DevDiv/_workitems/edit/823507

@tmeschter
Copy link
Contributor

Tom's triage notes: I don't think I fully understand what this issue is about.

If it is about surfacing a project property than I recommend we fix it for the new project system, but not CSProj.

@tmeschter
Copy link
Contributor

Spoke with @jcouv: The essence of this issue is that in C# code dotnet/roslyn can provide a code fix that updates the project file with a newer C# language version. We can't do the same for VB because we don't expose the VB language version property through the project system. I recommend fixing this for CPS, but not the CSProj project system.

@KathleenDollard
Copy link

@tmeschter: So the project file supports it and it is used by Visual Studio (I just checked) but we can't get at the value to change it? This is unfortunate. Most VB customers are on .NET Framework and would like to be able to use tuples and several other features.

(LangVersion in the project file must be supported to some degree to be used all the places it is.)

@paul1956
Copy link

paul1956 commented Jun 4, 2019

I VS2019 2.0 Preview 3, you can set VB Language version to 16, and use all the new features but you get a warning. I have had mixed results setting it to latest or leaving it out and while I have seen mention of Preview, for VB that does not work and version is set to 15. I would have expected that for VS 2019 leaving it out would have defaulted to 16 or at least 15.5, not 15 and when upgrading a project I would expect it leave version alone but when I use a new feature offer the option to upgrade the version number to one that support the feature as is done in C#.
image

@drewnoakes
Copy link
Member

@paul1956 it sounds like you're hitting https://developercommunity.visualstudio.com/content/problem/553000/load-of-property-langversion-failed.html. You can follow that ticket and vote it up to raise its profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Legacy-Application-Designer The "Application Designer" otherwise known as the legacy project properties Legacy Issues against the legacy project system. Triage-Approved Reviewed and prioritized
Projects
Archived in project
Development

No branches or pull requests

9 participants