我这样发布我的ASP.Net Core 3.1服务器:
dotnet publish --configuration Release --runtime win7-x64 -p:PublishTrimmed=true --output c:\MyServer
在c:\MyServer目录下,我得到了许多国际语言文件夹:cs、de、es、fr、zh-hans等。
我该如何只发布英文版本?
我尝试在我的csproj中使用ExcludeFoldersFromDeployment
:
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
<IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>
<AspNetCoreHostingModel>inprocess</AspNetCoreHostingModel>
<Nullable>enable</Nullable>
<ExcludeFoldersFromDeployment>cs;de;es;fr;he;hi;it;ja;ko;nl;pl;pt;ru;tr-TR;zh-Hans;zh-Hant</ExcludeFoldersFromDeployment>
</PropertyGroup>
但那没有帮助
有什么帮助吗?