。net核心版本会生成本地化文件夹

问题描述 投票:12回答:1

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

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

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

output content

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

.net-core publishing
1个回答
0
投票

。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

© www.soinside.com 2019 - 2024. All rights reserved.