How to convert a Visual Studio Setup Project to a ClickOnce deployment? - visual-studio

I made a very nice setup project (New Project -> Other -> Setup and Deployment -> Visual Studio Installer -> Setup Project), but I really like the way ClickOnce works.
Sadly I had to use a setup project because of some custom actions and registry editing during installation.
Is there a convenient way to make a ClickOnce deployment out of it?

You can't use any custom actions in ClickOnce and there is no way to edit the registry with ClickOnce.
If you need these features, ClickOnce will not work for you. There is no way to convert your deployment.

Related

How to enable publishing of ClickOnce applications?

I have SKD project Net461. VS 2019. And I dont have options to publish ClickOnce like it look like in: https://learn.microsoft.com/en-us/visualstudio/deployment/quickstart-deploy-using-clickonce-folder?view=vs-2019
I was looking for a component in VS installer and I find only one: "Publishing with the ClickOnce application".
I have only this:
And I don't have a publish tab in Project Properties.
Not through the IDE, but I was able to put ClickOnce in a WPF net48 project with new SDK style to run in an easy way when using msbuild /t:publish.
More info at https://stackoverflow.com/a/69583858/4386359

Integrate advanced installer Merge Module project with Visual studio

I have some merge module projects created using advanced installer. I need to integrate them with visual studio. I have done same for MSI projects and they work fine. but I don't know how to achieve continuous integration for MSM using Visual Studio.
Advanced Installer extension for Microsoft Visual Studio allows to create Advanced Installer Projects for Visual Studio. Each such project is a container that can include a single .AIP file.
The Visual Studio Solution can include one or more Advanced Installer Project for Visual Studio, in accordance with your needs.
Note that you need to remove the default project that is created when adding a new Installer Project to the .sln and add the existing project, the project that builds the .msm package.
edit
Indeed, you are right. It was a misunderstanding on our end.
On my machine I have several extensions installed side by side. One of these extensions also supports the build of a merge module project type.
We do not officially support this yet. The option to build other project types (e.g. Merge Module Project, Updates Configuration Project) with our VS extension will be available in a future version of Advanced Installer. I will let you know when we will add support for this.
Until then, you can use a build event as a workaround to build the Merge Module Project within the Visual Studio project.
To build the .msm project you can use a command line as described below:
http://www.advancedinstaller.com/user-guide/command-line.html#build-project
The command line can be something as below:
AdvancedInstaller.com" /build "$(SolutionDir)Merge module sample.aip"

how to make a uninstall option in C# program?

i want to make a uninstall option in my C# program?
can u help for this?
and provide some code also
If you deploy your application via a Visual Studio Setup and Deployment Project, an uninstaller will come standard with the installation. It will be available in the Add/Remove Programs of the control panel.
You can create an installation project which will automatically add support for uninstallation. Under Other Project Types you have Setup and Deployment. There is InstallShield LE and Visual Studio Installer. If you choose Setup Project under Visual Studio Installer project, you will have uninstall as part of the built project.
see this video
http://www.youtube.com/watch?v=Z-xFLltALg0
If you want the executable to remove itself. aka self-destruct. Check out this blog http://blog.pedroliska.com/2010/05/20/c-self-destruct-windows-app/

How to determine Visual Studio Setup and Deployment project prerequisites?

I am trying to deploy an app in C# with a Setup And Deployment project in VS2010. The main project and the deployment project are in the same solution and I have added the primary output of the main project to the deployment project. In the property pages for the deployment project, there is a button for prerequisites. How do I find out what items my app will require for successful deployment?
Thanks.. :)
Visual Studio will manage all the requisite DLL's that need to be installed for your application to run... If still you need to add more dependencies then you could create an application that will handle this process for you.
And since Microsoft has an easy solution for almost everything, there are options to the installer to do just this. Here you'll find it as per MS documentation.
Right click your project => propereties => Application => Target Framework

ClickOnce Deployment for a C++/CLI Project using Visual Studio 2008

How do I publish a C++/CLI Windows Forms project for ClickOnce deployment? The properties window for C++/CLI projects does not include a "Publish" tab (like in the C# projects).
You can follow the guidelines for manually deploying a ClickOnce application on MSDN.
This relies on the Windows Software Development Kit and command line tools instead of Visual Studio to do your deployment.
Just another note with this - if you can, I'd recommend trying to migrate to /clr:pure if possible. If you're working with native code, this won't work, but if it's a pure windows forms app, it will make the deployment scenario simpler, since you'll have fewer issues in ClickOnce with CAS requirements.
You cannot ClickOnce deploy an exe written in unmanaged code. The standard approach is to create a managed code stub exe that would launch your actual application.
Here's a related question.

Resources