![](/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.