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

[Discussion]: 3.0: Deprecating MvcPrecompilation tool #4910

Closed
pranavkm opened this issue Aug 22, 2018 · 4 comments

Comments

@pranavkm
Copy link
Member

commented Aug 22, 2018

In ASP.NET Core 1.1, we introduced the Microsoft.AspNetCore.Mvc.Razor.ViewCompilation (MVC precompilation tool) package that added support for publish time compilation of Razor files (.cshtml files). Starting in ASP.NET Core 2.1, we introduced the Razor SDK that expanded on the features of the precompilation tool by adding support for build and publish time of Razor files. The SDK allows for verifying the correctness of cshtml files at build time while also improving on startup time for applications. The Razor SDK is on by default and no gesture is required to start using it.

In 3.0, we plan to remove the earlier MVC precompilation tool. Earlier versions of the package will continue receiving important bug and security fixes as part of our patch release.

For users of ASP.NET Core 2.1 or later, we recommend migrating to the Razor SDK if you haven't already. If you're currently using the precompilation tool and are unable to migrate to the Razor SDK due to bugs or missing features, please file an issue at https://github.com/aspnet/Razor/issues.

@VictorioBerra

This comment has been minimized.

Copy link
Contributor

commented Aug 23, 2018

Just today after updating the App metapackage my dotnet publish started failing with this error:

C:\Users\vicber\.nuget\packages\microsoft.aspnetcore.razor.design\2.1.2\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets(69,5): error MSB4062: The "Microsoft.AspNetCore.Razor.Tasks.RazorTagHelper" task could not be loaded from the assembly C:\Users\vicber\.nuget\packages\microsoft.aspnetcore.razor.design\2.1.2\build\netstandard2.0\..\..\\tasks\netstandard2.0\Microsoft.AspNetCore.Razor.Tasks.dll. Assembly with same name is already loaded Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\Source\BBEEWT\myApp\src\LdapBrowser\LdapBrowser.csproj]

Is this related?

@joeaudette

This comment has been minimized.

Copy link

commented Aug 23, 2018

Just to clarify the needed change are you saying that apps that previously used:

<Project Sdk="Microsoft.NET.Sdk.Web">

should change to:

<Project Sdk="Microsoft.NET.Sdk.Razor">

?
and should we do this now to be ready for 3.0?

@pranavkm

This comment has been minimized.

Copy link
Member Author

commented Aug 23, 2018

@VictorioBerra could you file a separate issue for the error you're seeing?

@joeaudette - Microsoft.NET.Sdk.Razor is meant for building Razor class library projects i.e. if you're building \ packaging UI in a class library. If you're building a regular web application, you should continue targeting Microsoft.NET.Sdk.Web; it bundles the Razor Sdk and no further action is required to use it.

@aspnet-hello aspnet-hello transferred this issue from aspnet/Mvc Dec 14, 2018
@aspnet-hello aspnet-hello added this to the Discussions milestone Dec 14, 2018
@aspnet-hello

This comment has been minimized.

Copy link

commented Mar 11, 2019

We periodically close 'discussion' issues that have not been updated in a long period of time.

We apologize if this causes any inconvenience. We ask that if you are still encountering an issue, please log a new issue with updated information and we will investigate.

@aspnet aspnet locked and limited conversation to collaborators Mar 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.