【发布时间】:2021-01-12 16:51:36
【问题描述】:
我已经使用 Visual Studio 2019 在 C# 中创建了一个应用程序。当我发布它时,一切正常,但该 exe 文件在文件夹中包含其他 2 个文件。我只想拥有一个可以自行运行的 exe,在其位置没有任何额外文件,因此我尝试了发布设置中的“自包含”选项。但它没有用。我只得到一个“发生错误”的弹出窗口,上面写着:
Publish has encountered an error.
Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details.
A diagnostic log has been written to the following location:
"C:\Users\***\AppData\Local\Temp\tmp4E17.tmp"
在下面的输出框中我得到了这个:
1>Determining projects to restore...
1>Unable to load the service index for source
https://api.nuget.org/v3/index.json.
1> An error occurred while sending the request.
1> The request was aborted: Could not create SSL/TLS secure
channel.
========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped
==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
现在,我看到人们发布的一些类似问题以及一些可能的修复方法,但对我没有任何帮助。我已在 regedit 中将 TLS 1.3->Client->DisabledByDefault 值更新为 1,但仍然没有解决问题。
我正在使用系统 windows 7(32 位)。我期待任何可能的修复,提前谢谢你。
【问题讨论】:
-
能否请您与我们分享您使用的 nuget 名称?
-
关于这个问题的任何更新?请检查我的回答是否能帮助您解决问题?如果我的回答能帮助您解决问题,请不要忘记accept it。如果没有,请让我们知道您的任何疑虑,您将进一步帮助您。
标签: c# visual-studio windows-7 nuget visual-studio-2019