Publish WPF clickonce application to github

早过忘川 提交于 2019-12-23 04:47:07

问题


I have published my wpf project to the dir publish and it is under source control (github) So I want to add a download link to my readme.md and according to: Is it possible to offer a ClickOnce installer on Github? I should just add this in my markdown:

[Download the app](https://rawgithub.com/jphellemons/downloadyoutube/master/publish/setup.exe "Download the app")

I added https://rawgithub.com/jphellemons/DownloadYouTube/master/publish/ in the second publish step:

but that does not work. What step did I miss? Is it perhaps related to the error https://stackoverflow.com/questions/28157811/publish-click-once-to-github

Thanks to the comment of vilicvane I have this working setup.exe download link https://github.com/jphellemons/DownloadYouTube/blob/master/DownloadYouTube/publish/setup.exe?raw=true

but the setup.exe references the wrong .application file...

An error occurred trying to download 'https://rawgithub.com/jphellemons/DownloadYouTube/master/publish/DownloadYouTube.application'.

I have seen a working method externally hosting the blob: https://github.com/Code52/carnac so there is no way to keep everything on github?


回答1:


You can use a RawGit URL, which puts the correct Content-Type headers on the responses. Example:

https://cdn.rawgit.com/Microsoft/RESX-Unused-Finder/master/publish/ResxUnusedFinder.application

(Edit) RawGit is shutting down. I don't know of an alternative way to serve up the .application file with the correct Content-Type. I've moved to my own hosting.



来源:https://stackoverflow.com/questions/28174391/publish-wpf-clickonce-application-to-github

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!