我正在 .NET Core 中制作一个基本的控制台应用程序,当我尝试运行命令“dotnet build -c release -r win10-x64”时,我得到了这个:
Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packagesource/FindPackagesById()?id='Microsoft.NETCore.App.Runtime.win-x64'&semVerLevel=2.0.0'.
No such host is known.
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packagesource/FindPackagesById()?id='Microsoft.WindowsDesktop.App.Runtime.win-x64'&semVerLevel=2.0.0'.
No such host is known.
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packagesource/FindPackagesById()?id='Microsoft.AspNetCore.App.Runtime.win-x64'&semVerLevel=2.0.0'.
No such host is known.
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packagesource/FindPackagesById()?id='Microsoft.NETCore.App.Runtime.win-x64'&semVerLevel=2.0.0'.
No such host is known.
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packagesource/FindPackagesById()?id='Microsoft.WindowsDesktop.App.Runtime.win-x64'&semVerLevel=2.0.0'.
No such host is known.
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packagesource/FindPackagesById()?id='Microsoft.AspNetCore.App.Runtime.win-x64'&semVerLevel=2.0.0'.
No such host is known.
C:\Program Files\dotnet\sdk\3.1.201\NuGet.targets(124,5): error : Failed to retrieve information about 'Microsoft.NETCore.App.Runtime.win-x64' from remote source 'http://packagesourc
e/FindPackagesById()?id='Microsoft.NETCore.App.Runtime.win-x64'&semVerLevel=2.0.0'. [C:\Users\steve\PlatziCSharp\PlatziCSharp.csproj]
C:\Program Files\dotnet\sdk\3.1.201\NuGet.targets(124,5): error : No such host is known. [C:\Users\steve\PlatziCSharp\PlatziCSharp.csproj]
Build FAILED.
C:\Program Files\dotnet\sdk\3.1.201\NuGet.targets(124,5): error : Failed to retrieve information about 'Microsoft.NETCore.App.Runtime.win-x64' from remote source 'http://packagesourc
e/FindPackagesById()?id='Microsoft.NETCore.App.Runtime.win-x64'&semVerLevel=2.0.0'. [C:\Users\steve\PlatziCSharp\PlatziCSharp.csproj]
C:\Program Files\dotnet\sdk\3.1.201\NuGet.targets(124,5): error : No such host is known. [C:\Users\steve\PlatziCSharp\PlatziCSharp.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:08.30## Heading ##
它似乎缺少一些依赖项,我对此很陌生,我在网上找不到任何答案 任何人都可以帮助我如何安装我缺少的东西? 过去我尝试做另一个 .NET Core 项目,但出现了同样的错误,我放弃了它,这太令人沮丧了。
这篇文章没有任何意义,请删除它。