Search code examples
.net-corepublish

.NET Core build produces localization folders


I have a web ASP.NET solution that is using .NET Core 2.0. It's built using the following command:

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

When I check the output folder, I'm seeing a lot of localization folders as you can see in the image below:

output content

Is there a way to publish the code without generating these folders?


Solution

  • 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