ASP.NET CORE dotnet run 命令使用debug方式运行

由于我的开发环境比较复杂,每次调试一套项目都要启动好几个VS,比较繁琐,今天决定换一种方式调试,对于不该改动的代码的附加项目直接使用dotnet run命令以debug的运行方式运行,

一开始无法运行dubug方式,我需要的是Hosting environment: Development模式,后来在谷歌搜索找到了答案,不得不说百度真的很难找到解决方法,基本都是CTRL+C ,CTRL+V.

方法也很简单,windows 环境变量里面添加name= ASPNETCORE_ENVIRONMENT value=Development 的环境变量即可。

Using the windows control panel

If you're not a fan of the command prompt, you can easily update your variables using your mouse!Click the windows start menu button (or press the Windows key), search for environment variables, and choose Edit environment variables for your account:

Searching for control panel in start menu

Selecting this option will open the System Properties dialog:

System properties dialog

Click Environment Variables to view the list of current environment variables on your system.

Environment variables window

Assuming you do not already have a variable called ASPNETCORE_ENVIRONMENT, click the New... button and add a new account environment variable:

Adding a new environment variable

Click OK to save all your changes. You will need to re-open any command windows to ensure the new environment variables are loaded.

转载于:https://www.cnblogs.com/kzwrcom/p/5990050.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值