Step 1: Disable precompile 

updating below property in csproj file:

<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>

Apart from this, Razor pages will be updated live.

<PropertyGroup>
<ServerGarbageCollection>false</ServerGarbageCollection>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</PropertyGroup>

特别是 WebHost.csproj

 

Step2: clear cache 

This method worked for me:

  • delete obj and bin folders
  • run dotnet restore
  • run dotnet build

 

other:

It looks as if your project references are incorrect. You can reproduce what I'm seeing by doing the following:

    1. At the command line run dotnet nuget locals all -c
    2. At the command line run dotnet restore
    3. At the command line run dotnet build

 

 

最后: dotnet publish -r linux-x64

相关文章:

  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2021-09-09
  • 2021-06-29
  • 2021-05-31
  • 2021-07-01
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-16
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案