使用 Visual Studio 2019发布 ASP.NET Core 3 API netcoreapp3.1项目时,也会发布几个代码分析 dll。此外,这些 dll 以 13 种语言和英文版发布。
如何防止 Visual Studio 在生产服务器上发布代码分析 dll,包括英文版?
这些dll是:
Microsoft.CodeAnalysis.CSharp.resources.dll
Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll
Microsoft.CodeAnalysis.resources.dll
Microsoft.CodeAnalysis.Workspaces.resources.dll
我在 Window 10 上使用 Microsoft Visual Studio Enterprise 2019 版本 16.4.5。
发布配置为:
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