VS2022使用ClickOnce发布程序本地安装.net框架 - 谁主沉浮1226
source link: https://www.cnblogs.com/sheizhuchenfu2/p/17368723.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
VS2022使用ClickOnce发布程序本地安装.net框架
因为遇到下面的错误,没有在网上搜到详细解决问题的教程,费了一些时间才解决了问题,特此记录一下,也希望能帮助到其他人。
要在“系统必备”对话框中启用“从与我的应用程序相同的位置下载系统必备组件”,必须将“.NET 桌面运行时 6.0.14 (x64)”项的文件“net6desktopruntime_x64\windowsdesktop-runtime-6.0.14-win-x64.exe”下载到本地计算机。
在VS2022的要发布的项目上,右键》发布,选择ClickOnce ,下一步。
然后选择发布位置,下一步。
选择从网站还是从
下图是最后的配置。
最后点击发布,会出现错误。
这个时候可能出现这样的错误信息:
要在“系统必备”对话框中启用“从与我的应用程序相同的位置下载系统必备组件”,必须将“.NET 桌面运行时 6.0.14 (x64)”项的文件“net6desktopruntime_x64\windowsdesktop-runtime-6.0.14-win-x64.exe”下载到本地计算机。
那么解决方法是:
1. 从微软官方网站下载:“windowsdesktop-runtime-6.0.14-win-x64.exe”,地址为:https://download.visualstudio.microsoft.com/download/pr/035efed3-6386-4e1d-bcbc-384a20ebf47e/abfbea2303e0ce9cb15d430314e5858f/windowsdesktop-runtime-6.0.14-win-x64.exe
2. 把下载的文件放到这个目录下:C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VisualStudio\BootstrapperPackages\net6desktopruntime_x64
3.重新点击发布按钮,就正常了。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK