Remove ClickOnce from a WinForms app

前端 未结 5 752
眼角桃花
眼角桃花 2020-12-15 15:42

I have a WinForms application that was going to use ClickOnce. But it turns out ClickOnce won\'t work for my application, so I\'d like to remove it. Only...there doesn\'t

相关标签:
5条回答
  • 2020-12-15 15:43

    Other responses here are not correct or helpful. It is incorrect to state that it never needs removing.

    One such example I experienced recently was when the application had a need for administrative privileges. Any attempt to embed administrative requirements into the manifest will result in the application not even compiling while ClickOnce is still present in the solution.

    The following two steps enabled me to turn off ClickOnce (in Visual Studio 2010):

    In the project properties,

    1. Signing tab: Untick "Sign the ClickOnce manifests"
    2. Security tab: Untick "Enable ClickOnce security settings"
    0 讨论(0)
  • 2020-12-15 15:58

    I agree with the others, there is no need to "remove ClickOnce".

    If you are really going for it though, IIRC all ClickOnce settings are in the .csproj file for the project, so remove all XML tags there that relate to ClickOnce. (maybe easiest to compare to a new app that hasn't been deployed with CO ever to see what tags are not there)

    0 讨论(0)
  • 2020-12-15 16:01

    If you refer the the ClickOnce Application Deployment Manifest files that appear in your Debug folder, go to Project Properties -> Security and uncheck 'Enable ClickOnce Security Settings'

    You can also go to Project Properties -> Signing and uncheck 'Sign the ClickOnce manifests', but this is not necessary because it does not have what to sign if you do the first uncheck.

    Now if you go to debug and delete .application files, at rebuild, there will not appear again.

    0 讨论(0)
  • 2020-12-15 16:02

    Just in case this helps anyone...

    My problem was specifically that I had a dependant "Class Library" project that had the "sign the clickonce manifest" checked but disabled so it could not be unchecked. My solution was to:

    • Convert that project to a windows app,
    • Re-open the properties panel,
    • Remove the click once manifest signing from the signing tab on the properties panel,
    • Convert the project back to a "Class Library".

    I consider it an MS bug (still in VS2019 16.0.1 which I'm using now) but the workaround fixed it.

    Good Luck!

    0 讨论(0)
  • 2020-12-15 16:05

    I believe the only thing that is left from ClickOnce once you stop deploying it is file publish.xml that tells you about what you have deployed thus far and what version you are at. Otherwise there is really nothing there that need concern you, just deploy from the bin folders as you would without ClickOnce.

    0 讨论(0)
提交回复
热议问题