Remove ClickOnce from a WinForms app

Viewed 24669

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 seem to be an obvious way to do this. There's no "Un-ClickOnce" button. Does anybody know what steps I need to take to get my app to be like it was before ClickOnce integrated itself?

(I know I can create a new project and import stuff into it, but it seems silly to have to do that, so I'm hoping there's another way.)

5 Answers

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)

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.

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!

Related