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

Default to MVC 3.0 when we can't detect the Razor configuration #1167

Merged
merged 2 commits into from
Oct 1, 2019

Conversation

ajaybhargavb
Copy link
Contributor

dotnet/aspnetcore#13291

Working on verifying it in VS (As soon as I can build Razor on my borked machine)

NTaylorMullen and others added 2 commits September 24, 2019 15:06
- Added a `Latest` configuration so we no longer need to look through every file to update the "latest" fallback configuration.
- Added understanding for MVC2.2, we default to the 2.1 configuration (there were no Razor changes between the two).

dotnet/aspnetcore#13291
@ajaybhargavb ajaybhargavb changed the title Ajbaaska/default30 Default to MVC 3.0 when we can't detect the Razor configuration Sep 24, 2019
@@ -44,13 +50,17 @@ public static RazorConfiguration SelectConfiguration(Version version)
{
return MVC_2_0;
}
else if (version.Major == 2 && version.Minor == 1)
else if (version.Major == 2 && version.Minor >= 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

@NTaylorMullen
Copy link
Contributor

Hmm, just thinking out loud, do we have any MSBuild bits that default to non-3.0 for projects that aren't explicit? Could be a total goose chase but i'm thinking of the Razor build server and such on how it decides to build Razor bits where the Razor configuration isn't clear.

@rynowak
Copy link
Member

rynowak commented Sep 25, 2019

I don't think we have that yet, we'd need a 5.X sdk and 5.X TFM since language version default is tied to TFM for us.

@ajaybhargavb ajaybhargavb changed the base branch from master to release/3.1 September 25, 2019 17:16
@NTaylorMullen
Copy link
Contributor

I don't think we have that yet, we'd need a 5.X sdk and 5.X TFM since language version default is tied to TFM for us.

I see

@ajaybhargavb
Copy link
Contributor Author

Verified this in VS. It defaults to 3.0 when Razor configuration could not be determined.

@ajaybhargavb ajaybhargavb merged commit c439c5d into release/3.1 Oct 1, 2019
@ghost ghost deleted the ajbaaska/default30 branch October 1, 2019 02:18
ajaybhargavb added a commit that referenced this pull request Oct 1, 2019
* Default to MVC 3.0 when we can't detect the Razor configuration.

- Added a `Latest` configuration so we no longer need to look through every file to update the "latest" fallback configuration.
- Added understanding for MVC2.2, we default to the 2.1 configuration (there were no Razor changes between the two).

dotnet/aspnetcore#13291

* Set RazorLanguageServer default RazorVersion to 3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants