gpt4 book ai didi

c# - 在 .NET Core csproj 文件中更改为 (复数)时出错

转载 作者:太空宇宙 更新时间:2023-11-03 14:39:27 24 4
gpt4 key购买 nike

我正在关注 Pluralsight 上的教程,内容是关于让 MSTest 项目同时针对 .net core 2.2 和 .NET 4.7.2。这需要转到我的测试项目的 .csproj 文件并对其进行编辑,以便:

 <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
...

将变为 TargetFrameworks(现在是复数形式),然后我们添加 .NET 4.7.2 名字对象,如下所示:

 <PropertyGroup>
<TargetFrameworks>netcoreapp2.2;net472</TargetFrameworks>
...

我一保存 .csproj 文件,VS 2019 就在顶部的黄色栏中显示以下错误:

The project ran into a problem during the last operation: The value ofthe 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties inthe 'Debug|AnyCPU' configuration are both empty. This configurationwill not contribute to NuGet restore, which may result in restore andbuild errors.

我做错了什么?

最佳答案

对我来说,当我关闭 Visual Studio 并再次打开解决方案时错误消失了

关于c# - 在 .NET Core csproj 文件中更改为 <TargetFrameworks>(复数)时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57981214/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com