Search code examples
.net-corepublishing

.net core build produces localization folders


I have a web asp.net solution that is using .net core 2.0. I am building it using the command:

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

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

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