我有一个使用.net core 2.0的web asp.net解决方案。我正在使用命令来构建它:

dotnet publish MySolution.sln --configuration release --output d:\test_output

但是当我检查输出文件夹时,我看到了很多本地化文件夹,如下图所示:

.net-core - .net核心版本生成本地化文件夹-LMLPHP

有没有一种方法可以在不生成这些文件夹的情况下发布代码?

最佳答案

.csproj 文件上,寻找“Microsoft.VisualStudio.Web.CodeGeneration.Design” 程序包引用,并添加属性 ExcludeAssets =“All”

<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.1" ExcludeAssets="All" />

这是引用:Disable Dll Culture Folders on Compile

关于.net-core - .net核心版本生成本地化文件夹,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/48424796/

10-11 23:17
查看更多