Visual Studio 2017 Localization Publish Settings

自作多情 提交于 2019-12-03 12:53:25

问题


This should be simple, but I haven't found a way to make this stop happening. Visual Studio publishes a lot of localized DLLs - It appears there is German localization, Spanish localization, Italian localization, french localization, Japanese localization, Russian localization and Korean localization. I have an ASP.NET Web API ODATA application, and when I publish the project using Visual Studio 2017, I have these localized dll's taking up unnecessary space in the bin folder. My application only needs to support En-US. How can I make this change? Screenshot of published bin folder:


回答1:


Here is what worked for me:

  1. Open your csproj file with your favorite editor
  2. Under the heading <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> add the line:

<ExcludeFoldersFromDeployment>bin\ar;bin\cs;bin\de;bin\es;bin\fr;bin\he;bin\hi;bin\it;bin\ja;bin\ko;bin\nl;bin\pl;bin\pt;bin\ru;bin\tr-TR;bin\zh-Hans;bin\zh-Hant</ExcludeFoldersFromDeployment>

  1. Republish your solution



回答2:


In my case i just remove below item from csproj file

<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.1.0" />

Best Regurds



来源:https://stackoverflow.com/questions/48893450/visual-studio-2017-localization-publish-settings

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