Yeo*_*ong 4 asp.net-mvc json razor
我的 API 中存在以下问题,当我尝试在本地主机中运行代码时,代码运行正常,但是当我尝试发布它时,会出现此错误 帮助!
错误命令“”dotnet”exec --runtimeconfig“〜\ xxxx-api \ API.xxxx \ bin \ Release \ netcoreapp2.0 \ API.xxxx.runtimeconfig.json”--depsfile“〜\ xxxx-api \ API。 xxxx\bin\Release\netcoreapp2.0\API.xxxx.deps.json" "C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.mvc.razor.viewcompilation\2.0.0\build\netstandard2.0 \Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.dll" @"obj\Release\netcoreapp2.0\microsoft.aspnetcore.mvc.razor.viewcompilation.rsp"" 退出,代码为 1。 API.xxxx 0
以防万一有人遇到同样的问题:
在 csproj 上添加此行代码:
<ProperyGroup>
...
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
</ProperyGroup>
Run Code Online (Sandbox Code Playgroud)
https://github.com/aspnet/Mvc/issues/6659
https://github.com/aspnet/Mvc/issues/7393
| 归档时间: |
|
| 查看次数: |
2517 次 |
| 最近记录: |