Deleting PrecompiledViews.dll from ASP.Net Core 2 API

▼魔方 西西 提交于 2019-12-02 05:57:16

You are right, the precompile step always emits an assembly and doesn't check if there are actually views. You can disable the precompilation step by putting this into your csproj file:

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

This will then activate the normal copilation context preservation (refs subfolder). To deactivate this as well, add

<PreserveCompilationContext>false</PreserveCompilationContext>

to the property group.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!