gpt4 book ai didi

c# - Visual Studio 2017 RC 核心控制台项目无法编译

转载 作者:太空狗 更新时间:2023-10-30 00:38:28 25 4
gpt4 key购买 nike

当我创建一个新的 enoty 核心控制台项目时,它无法编译

我可以看到 nuget 包没有恢复。

enter image description here

当我运行 dotnet restore 时出现错误

microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.RuntimeIdentifierInference.targets(45,5): error : RuntimeIdentifier must be set for .NETFramework executables. Consider RuntimeIdentifier=win7-x86 or RuntimeIdentifier=win7-x64.

我错过了什么?

最佳答案

正如@annemartijn 所建议的,但是没有 s

<RuntimeIdentifier>win7-x64</RuntimeI‌​dentifier>

查看 github 上的问题:https://github.com/dotnet/cli/issues/4619

在您的 .csproj 文件中插入运行时标识符段:

<Project...
<Import...
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
...
<RuntimeIdentifier>win7-x64</RuntimeI‌​dentifier>
</PropertyGroup>
...

关于c# - Visual Studio 2017 RC 核心控制台项目无法编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40852732/

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