您的位置:首页 > 编程语言 > ASP

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

2016-10-23 14:57 507 查看
由于我的开发环境比较复杂,每次调试一套项目都要启动好几个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 [code]environment variables
, and choose Edit environment variables for your account:



Selecting this option will open the System Properties dialog:



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



Assuming you do not already have a variable called
ASPNETCORE_ENVIRONMENT
, click the New... button and add a new account 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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐