[英]Can't launch dotnet-watch configuration in debug mode asp.net core 6 mac m1 Rider
On start up, it writes Cannot open assembly '/usr/local/share/dotnet/dotnet': File does not contain a valid CIL image.
启动时,它会显示
Cannot open assembly '/usr/local/share/dotnet/dotnet': File does not contain a valid CIL image.
. .
I have two versions of platform installed: .net 6 and .net core 3.1.我安装了两个版本的平台:.net 6 和 .net core 3.1。 This is my
launchSettings.json
:这是我的
launchSettings.json
:
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:23641",
"sslPort": 44387
}
},
"profiles": {
"Web": {
"commandName": "Project",
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7047;http://localhost:5148",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Watch": {
"commandName": "Executable",
"executablePath": "dotnet",
"workingDirectory": "$(ProjectDir)",
"commandLineArgs": "watch run"
}
}
}
Both modes work great with Web
configuration.这两种模式都适用于
Web
配置。 But it requires me to restart it on many changes.但这需要我在进行许多更改时重新启动它。 .NET 6 hot reload is enabled by default.
.NET 6 热重载默认启用。
I didn't understand exactly what was wrong.我不明白到底出了什么问题。 I fixed this by uninstalling all
.NETs
and reinstalling it one by one, with checking the ability to debug.我通过卸载所有
.NETs
并一一重新安装它并检查调试能力来解决此问题。 I guess that the problem was with that I firstly installed Core 3
which was for x64 architecture and after arm64 .NET 6
.我想问题出在我首先安装了用于 x64 架构的
Core 3
和 arm64 .NET 6
之后。 Or, maybe, it was the problem with the .NET 6
specific version, as it was the first version.或者,也许是
.NET 6
特定版本的问题,因为它是第一个版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.