.net - 在 .netcoreapp 中启用开发模式

标签 .net .net-core

.netcoreaps是否支持使用developmentMode和DEVPATH?

对于 Windows 上的 .net 框架,我通常在 .exe.config 文件中启用它,但当我使用 dotnet 运行应用程序并在 .dll.config 中启用它时,似乎不起作用

最佳答案

.NET Core 支持开发模式和 DEVPATH,但它的用法有点隐藏。它可以通过 coreclr repo 文档中描述的运行时配置旋钮进行设置:

https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/clr-configuration-knobs.md

要设置开发者模式,需要使用developerInstallation旋钮,它可以通过环境变量进行设置。

When using these configurations from environment variables, the variables need to have the COMPlus_ prefix in their names. e.g. To set DumpJittedMethods to 1, add the environment variable COMPlus_DumpJittedMethods=1

要使其正常工作,请执行以下操作:

  1. 设置环境变量 DEVPATH 指向开发程序集的位置。

  2. 通过设置环境变量启用developerInstallation旋钮:

设置 COMPlus_developerInstallation=1

启动运行时并享受 .NET Core 中的 DEVPATH 和开发模式功能。

关于.net - 在 .netcoreapp 中启用开发模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47208552/

相关文章:

c# - 从 C# 打印数据的好方法?

.net - NHibernate Linq 查询比 HQL 慢 3 倍

.net - "fat32 clients"或 "fat32 applications"是什么意思?

asp.net-core - Visual Studio 2019 - IIS Express - 连接已重置 (ERR_CONNECTION_RESET)

c# - ASP.NET 中的 Gridview 删除按钮

.net - 使用 Microsoft.Office.Interop.Excel 从 Excel 读取文本格式

c# - -在 Scaffold-DbContext 中无法识别命名空间选项

c# - .NET 核心 2.2 : xUnit Theory Inlinedata not working with enum values

.net - 无法解决 .NET Core 和 .NET Framework 之间的项目依赖问题

c# - 为什么.net core 允许通过项目依赖项访问程序集