简体   繁体   English

适用于Mac的Visual Studio的Dot NET Core托管环境

[英]Dot NET Core Hosting Environment for Visual Studio for Mac

Trying out the new Visual Studio for Mac preview. 试用新的Visual Studio for Mac预览。 Dotnet core mvc project compiles and runs perfectly :D:D:D Dotnet核心mvc项目可以编译并完美运行:D:D:D

Only problem is; 唯一的问题是; It uses the default Hosting environment: Production. 它使用默认的托管环境:生产。

I have tried to put export ASPNETCORE_ENVIRONMENT=Development inside my bash profile and export it in my terminal. 我试图将导出ASPNETCORE_ENVIRONMENT =开发放入我的bash配置文件中,并将其导出到我的终端中。

Running dotnet in cli works fine with that environment but not in Visual Studio for Mac. 在cli中运行dotnet可以在该环境下正常运行,但在Visual Studio for Mac中则不能。

I can't seem to find where I can add the environment variable it should use when debugging. 我似乎找不到在哪里可以添加调试时应使用的环境变量的位置。

Ok I was being a bit of a moron. 好吧,我有点白痴。

You have to right click on the project and NOT the solution. 您必须右键单击项目,而不是解决方案。 - Options - Run Configurations Default - Environment Variables -选项-运行配置默认-环境变量

只是要添加到原始答案:就我而言,我必须重新启动Visual Studio才能使环境变量正常工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio For Mac .net Core 2.0 Ajax将模型传递给控制器 - Visual Studio For Mac .net Core 2.0 Ajax passing model to controller Visual Studio for Mac控制台应用程序.net Core 2命令行参数 - Visual Studio for Mac Console Application .net Core 2 command line arguments Visual Studio Preview for Mac 2017 .NET Core构建错误 - Visual Studio Preview for Mac 2017 .NET Core build error 在.NET Core 2,Mac OS,使用MySQL的Visual Studio for Mac上:ArgumentOutOfRangeException:长度不能小于零 - On .NET Core 2, Mac OS, Visual Studio for Mac using MySQL: ArgumentOutOfRangeException: Length cannot be less than zero Mac Visual Studio 是否有环境变量配置文件? - Is there an environment variables config file for Mac Visual Studio? Visual Studio Mac与dotnet core 2不兼容 - Visual Studio Mac incompatible with dotnet core 2 在Visual Studio for Mac和Asp.net Core 2.0 Web API中生成后无法运行解决方案 - Unable to run solution after build in Visual Studio for Mac and Asp.net Core 2.0 Web API 无法在 Visual Studio 2019 for Mac 上运行 .NET Core 3.1 测试项目 - Cannot run .NET Core 3.1 tests projects on Visual Studio 2019 for Mac Visual Studio for Mac 上的 .net-core3.1:无法配置 HTTPS 端点 - .net-core3.1 on Visual Studio for Mac: Unable to configure HTTPS endpoint .NET 核心 3 API,在 Mac 上使用 Visual Studio Code 开发:如何在 IIS 上部署和配置? - .NET core 3 API, develop on Mac with Visual Studio Code: how deploy and configure on IIS?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM