Visual Studio 2017 Localization Publish Settings
Asked Answered
F

3

17

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:

enter image description here

Fiesta answered 20/2, 2018 at 20:12 Comment(3)
Do you use any external dlls that are localized to these languages?Blaylock
No dll's that are localized to my knowledge.Fiesta
Does this answer your question? Why is Microsoft.CodeAnalysis published with ASP.NET Core website?Colver
F
10

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
Fiesta answered 20/2, 2018 at 20:51 Comment(3)
I do not think this is for .net coreTeodora
@DanielWilliams did you find any solution for .Net Core ?Unexpected
Yes though I don’t like it. In the post build just have it delete each of those folders.Teodora
U
0

I faced the same problem for my .NET core 2.0 web API. It appeared when I moved the solution from a machine to another where a new version of .NET Core was installed: .NET Core 2.1 ; That's why, on publishing all files of .NET core 2.0 where generated. To resolve this issue, I decided to migrate to version 2.1 which solved the issue and the published files were generated smoothly :)

Unexpected answered 3/3, 2020 at 10:28 Comment(0)
D
-4

In my case i just remove below item from csproj file

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

Best Regurds

Dildo answered 4/7, 2019 at 14:23 Comment(1)
I don't see this line in the csproj file in the my .NET Core 3.1 project.Birdcage

© 2022 - 2024 — McMap. All rights reserved.