How to prevent code analysis dlls to be published on production server?

Viewed 989

When publishing an ASP.NET Core 3 API netcoreapp3.1 project with Visual studio 2019, several code analysis dlls are published too. Moreover the dlls are published in 13 languages plus the english version.

How can I prevent Visual Studio from publishing code analysis dlls on the production server including the english version?

The dlls are:

Microsoft.CodeAnalysis.CSharp.resources.dll
Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll
Microsoft.CodeAnalysis.resources.dll
Microsoft.CodeAnalysis.Workspaces.resources.dll

I am using Microsoft Visual Studio Enterprise 2019 Version 16.4.5 on Window 10.

The publish configuration is:

Configuration: Release x64
Target framework: netcoreapp3.1
Deployment mode: Framework dependent
Target runtime: win-x64

File Publish Options:
Produce single file: no
Enable ReadyToRun compilation: yes
Delete all existing files prior to publish: yes
0 Answers
Related