0

How can I completely disable or remove click-once deployment from my VSTO project?

I have created an msi installer for my office addin following this guide: https://learn.microsoft.com/en-us/visualstudio/vsto/deploying-a-vsto-solution-by-using-windows-installer?view=vs-2022

I am not using clickonce and don't need it, but every time I remove items below, they come back when I run a build

<IsWebBootstrapper>False</IsWebBootstrapper>
<BootstrapperEnabled>true</BootstrapperEnabled>
<PublishUrl>publish\</PublishUrl>
<InstallUrl />
<TargetCulture>en</TargetCulture>
<ApplicationVersion>1.0.0.0</ApplicationVersion>
<AutoIncrementApplicationRevision>false</AutoIncrementApplicationRevision>
<UpdateEnabled>true</UpdateEnabled>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>days</UpdateIntervalUnits>
<ProductName>MyAddIn</ProductName>
<PublisherName>Contoso</PublisherName>
<SupportUrl />
<FriendlyName>My Add-In</FriendlyName>
<OfficeApplicationDescription>My Add-In</OfficeApplicationDescription>
<LoadBehavior>3</LoadBehavior>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>

Edit: There are a few answers that seem to be outdated or incorrect. Current VSTO projects do not seem to allow disabling of clickonce settings. In fact, "Enable ClickOnce security settings" is not selected to begin with, playing with enabling and disabling this and "Sign the ClickOnce manifest" doesn't produce desired effect

enter image description here

Jason
  • 3,844
  • 1
  • 21
  • 40

1 Answers1

0

As per https://stackoverflow.com/a/5798211/, you could go into your project's properties to try unticking the box "Enable ClickOnce security settings" under the Security tab, and unticking the "Sign the ClickOnce manifests" under the Signing tab.

But, you might be asking (as I did)... "Where is the 'Security' tab?"

As per this SO answer, there is what feels like an "Easter Egg" way of making the Security tab appear:

  1. In the Application tab, for Application Type, select Windows Forms Application from the drop-down menu (other drop-down options might also work but haven't tried them)

  2. Save everything: In the main menu bar of Visual Studio, click File > Save All.

  3. Close your project Properties window (i.e. the one with the Application tab that we were just modifying)

  4. Open your project Properties window again: in your Solution Explorer, select your project, go to the main menu bar, click Project, click Properties.

  5. Voila! It should be there. :)

I confirmed on my VSTO add-in project that the Security tab in fact appears after switching the Output type from "Class Library" to "Windows Application" on the Application tab, and then closing and re-opening the properties window.

Hopefully you will find the ClickOnce box there ticked -- allowing you to untick it.

But don't forget! You should then switch the Output type back to "Class Library" on the Application tab.

General Grievance
  • 4,555
  • 31
  • 31
  • 45
wopr_xl
  • 150
  • 1
  • 9