Pio*_*dka 13 .net c# development-environment
根据微软文档: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-run ?source=docs
这个SO线程 如何确定asp.net core应用程序将在哪个环境中运行?
我仍然无法确定dotnet runlaunchProfile.json 中的默认配置文件设置是什么?
谢谢,皮奥特
小智 27
dotnet run --launch-profile "SampleApp"
Run Code Online (Sandbox Code Playgroud)
此方法目前仅支持使用 .NET 6 的 Kestrel 配置文件。例如,--launch-Profile唯一支持在文件中"SampleApp"定义commandName的。"Project"launchSettings.json
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:59481",
"sslPort": 44308
}
},
"profiles": {
"SampleApp": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7152;http://localhost:5105",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12584 次 |
| 最近记录: |