Skip to content

Conversation

@pranavkm
Copy link
Contributor

As part of #35017, I had consolidated the DefaultViewCompiler and DefaultViewCompilerProvider types, largely as a clean up. The type DefaultViewCompilerProvider is looked up by the RuntimeCompilation package by name, and when making this change, this code was also updated.

However, we've had two reports so far of users trying to use an 5.0 or earlier version of the runtime compilation package with a 6.0 app. In this case, the lookup fails and the runtime compilation feature doesn't work as expected. This is a small change to preserve backwards compatibility.

Fixes #35267

As part of #35017, I had consolidated the DefaultViewCompiler and DefaultViewCompilerProvider
types, largely as a clean up. The type DefaultViewCompilerProvider is looked up by the RuntimeCompilation package by name, and when making
this change, this code was also updated.

However, we've had two reports so far of users trying to use an 5.0 or earlier version of the runtime compilation package with a 6.0 app. In this case, the lookup
fails and the runtime compilation feature doesn't work as expected after this.

Fixes #35267
@pranavkm pranavkm requested a review from javiercn as a code owner September 27, 2021 21:44
@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Sep 27, 2021
@pranavkm pranavkm requested a review from a team September 27, 2021 21:44
f.ServiceType == typeof(IViewCompilerProvider) &&
f.ImplementationType?.Assembly == typeof(IViewCompilerProvider).Assembly &&
f.ImplementationType.FullName == "Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompiler");
f.ImplementationType.FullName == "Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultViewCompilerProvider");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Offending code. I know I should do better than this, but this is what happens when I'm left to do work unchecked

@pranavkm
Copy link
Contributor Author

/backport to release/6.0

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@pranavkm an error occurred while backporting to release/6.0, please check the run log for details!

Error: @pranavkm is not a repo collaborator, backporting is not allowed.

@pranavkm pranavkm enabled auto-merge (squash) September 27, 2021 23:36
@pranavkm pranavkm merged commit 60b4893 into main Sep 27, 2021
@pranavkm pranavkm deleted the prkrishn/35267 branch September 27, 2021 23:57
@ghost ghost added this to the 7.0-preview1 milestone Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dotnet-sdk-6.0.100-rc.1.21408.1] partial view can't be load when Compiled in Runtime with mixcore app.

3 participants