尝试在 .Net5 中发布时出现 Nuget 错误

Nuget error when trying to publish in .Net5

当我在 .Net5 中发布时,出现以下错误

Severity Code Description Project File Line Suppression State Error Assets file 'C:\Users\cornelis.dejager\source\repos\Marel.MSAWebServiceAPI\Marel.MSAWebServiceAPI\obj\publish\win-x86\project.assets.json' not found. Run a NuGet package restore to generate this file. Marel.MSAWebServiceAPI 0

Severity Code Description Project File Line Suppression State Error Failed to retrieve information about 'Microsoft.WindowsDesktop.App.Runtime.win-x86' from remote source 'https://api.nuget.org/v3-flatcontainer/microsoft.windowsdesktop.app.runtime.win-x86/index.json'. An error occurred while sending the request. The request was aborted: Could not create SSL/TLS secure channel. Marel.MSAWebServiceAPI 0

是什么原因造成的:

老实说,我不确定。在我更改代码后它停止工作。该项目几周来一直很好,突然间发生了变化。

我试过了

附加信息

我真的不明白为什么发布不起作用。看了好几个地方,还没找到解决方法。

可能是包源错误,

在Visual Studio转到

Options=> Nuget Package Manager=> Package Sources

如果您使用的是自定义来源,请确保您输入的地址正确。 NuGet 默认源地址是https://api.nuget.org/v3/index.json