asp.net core2.0中网站发布的时候,视图文件不被打包成dll

项目csproj文件里面加

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
  </PropertyGroup>
</Project>

加入MvcRazorCompileOnPublish=false这句。

具体请参考

https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-compilation?tabs=aspnetcore2x

posted @ 2019-03-18 10:17  lappple  阅读(785)  评论(0编辑  收藏  举报