.net core build produces localization folders

The solution provided by @Igor.K worked for my API project, but for the ASP.NET Core MVC website in my solution, I had to make a minor change.

Try adding the line below to your .csproj file.

<PropertyGroup>   
    <ResourceLanguages>en</ResourceLanguages>
</PropertyGroup>

You can edit this file by right-clicking your project and selecting "Unload Project". Then, when you right-click again you will be able to edit the .csproj file. Make sure you reload the project when you're finished though.

So, if SatelliteResourceLanguages doesn't solve your problem, ResourceLanguages might do the trick.


For the projects using ASP.NET Core 3.1, add this line to your *.csproj file:

<PropertyGroup>   
    <SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>

The source of the answer in this post: Disable Dll Culture Folders on Compile.


On the .csproj file, you look for "Microsoft.VisualStudio.Web.CodeGeneration.Design" Package reference and add the property ExcludeAssets="All"

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

Here is the reference: Disable Dll Culture Folders on Compile