![](/img/trans.png)
[英]How to configure Visual Studio to collapse all regions by default?
[英]Visual Studio 2019: how to configure the default CLR for the debugger?
I recently installed Visual Studio 2019 on Windows with .NET 5 and .NET Core 3.1 (I did not install any .NET Framework SDK, but seems to be a dependency of other stuff I installed). 我決定創建一個測試 F# .NET Core 3.1 項目,下面是.csproj
文件:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Name>FSharpSample</Name>
<ProjectGuid>{be6b33ca-c77e-49de-af02-5febd314d410}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<EnableUnmanagedDebugging>true</EnableUnmanagedDebugging>
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<StartAction>Project</StartAction>
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
</Project>
問題是,當我嘗試使用 Visual Studio 2019 中的“開始”按鈕開始調試進程時,出現此錯誤:
但是,在沒有調試器的情況下啟動項目並使用“托管(.NET Core,.NET 5+)代碼”選項將調試器附加到正在運行的進程是有效的。 作為參考,這些是我安裝的組件:
我錯過了什么? 謝謝你。
解決方案是為 Visual Studio 2019 安裝 .NET 桌面環境功能。我不知道為什么需要它,我認為 SDK 就足夠了,所以如果你知道,請澄清一下。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.