2021年1月29日 星期五

[.Net 5] Upgrade to NET 5 issues

 

 .NET 5   Upgrade issues   

 

 

Trouble shooting


 

 

The "RazorGenerate" task failed unexpectedly

 

After installing .NET 5 SDK, using Visual Studio 2019 (Version 16.8.3) on Windows to build .NET Core 2.2 project will get the error:

 

The "RazorGenerate" task failed unexpectedly

 

 

To resolve the issue, following the steps (Reference: https://stackoverflow.com/a/64834683/7045253 ).

 

1.  Set DOTNET_HOST_PATH environment variable.

$ setx DOTNET_HOST_PATH "%ProgramFiles%\dotnet\dotnet.exe"



2.  Delete C:\Program Files\dotnet\sdk\NuGetFallbackFolder.

3.  Restart your PC.

 

 

 

 

沒有留言:

張貼留言