Moving from windows installer to ClickOnce deployment - visual-studio-2010

We have a windows application. To deploy it we used windows installer. Now as our application require lots of automatic update we are thinking to move to winform clickonce deployment.
The only problem is we have some DLL in our project which require registration (vsdrfCOMRelativePath). How can I achieve the same in clickonce deployment

ClickOnce installs are for one user account, so will that be an issue? Services won't install either. ClickOnce isn't just another way of doing what an MSI install does, it is very different. You may be better off adding code to your app to call a web service and downloading the update rather than converting to ClickOnce. As far as I know, you can't run COM registration from ClickOnce. Make sure you understand all the ways in which MSI differs from ClickOnce!

Related

How to Deploy a Windows Service using Visual Studio 2017 Community

Working with VS2017 Community I have written a service that works on my local machine. I followed the instruction here:
https://learn.microsoft.com/en-us/dotnet/framework/windows-services/walkthrough-creating-a-windows-service-application-in-the-component-designer
and installed it successfully using Installutil.exe (as per instructions in above link). All good.
I now want to deploy that across six servers in our organisation. In Microsoft's documentation about installing services (https://learn.microsoft.com/en-us/dotnet/framework/windows-services/how-to-install-and-uninstall-services) it says:
If you’re a developer who wants to release a Windows Service that users can install and uninstall you should use InstallShield
and links to a page that applies to VS2012 (can't post any more links as my reputation<10)
I have downloaded and installed the "Microsoft Visual Studio 2017 Installer Projects" package, which allows me to create a Setup Project. When I run it, it installs the project output correctly (i.e. copies the exe & dll files to the correct folder in Program Files) but does not create the service.
There's a detailed post about deploying services on this site (question 9021075) but when I follow those instructions I get a 1001 error on Install.
All the documentation I can find refers to earlier versions of VS or the previous Installer package, so I'm not even certain if I can do it with the software I am using.
So, with VS2017 Community using Microsoft Visual Studio 2017 Installer Projects, how to I create a stand-alone Installer to deploy a service that works correctly when installed locally using InstallUtil?
Or can I use InstallUtil on the target machines? I think I'd need to install Visual Studio on them for that, which I'd prefer not to. Is there a quicker way?
I only have 6 servers to install this on, so even some manual work-around might do.
Thank you for the responses. I now have a solution. I found InstallUtil on the Target Server (in my case it was in C:\Windows\Microsoft.NET\Framework64\v4.0.30319 but search will find it). I copied and added that to my project as content so when I now deploy it, I have InstallUtil in the same folder as my EXE.
To install, I run CMD as admin, cd to project folder and issue command:
installutil.exe myService.exe
This is a one-off task. Once the service is working, to update it I just need to stop it, upload the new myService.exe (& any DLLs) to overwrite the old ones and restart it again.
Further information about settings you're using for the serviceProcessInstaller1 and serviceInstaller1 files will be needed to debug this issue, as the 1001 error raised by the installer is a generic error.
An alternative way of doing this is to use Topshelf, which is a framework for hosting services written using the .NET framework. It simplifies the creation of services, allowing developers to create a simple console application that can be installed as a service using Topshelf. The reason for this is simple: It is far easier to debug a console application than a service. And once the application is tested and ready for production, Topshelf makes it easy to install the application as a service.
Alternatively, you could use InstallUtil.exe. It is part of the .NET Framework, so no need to install Visual Studio.

Do I have to sign my ClickOnce manifest?

I have a VS2012 solution (WinForm vb.net) which I deploy thanks to ClickOnce. I do some tests today for deploying this application. I'm able to publish and deploy this application without signing the ClickOnce manifest nor signing the assembly. On the Signing tab of my project I uncheck 'Sign the ClickOnce manifests' and 'Sign the assembly'. I don't have any errors (about assembly not signed) when installing this application.
I copy the published folder on a USB key and install it on another computer without problem. I'm also able to update my application and install these updates automatically (thanks to ClickOnce).
I read a lot about ClickOnce and signing and it seems I don't have to sign for WinForm application.
Does someone can confirm this? I wonder if I copy my ClickOnce folder on a share on the network company if I can always install it without problems?
Tomorrow I will have the opportunity to try to install on the company's network (not today).
Thanks for your help.
Signing ClickOnce manifests is optional since .Net 3.5. See here for confirmation from Microsoft: http://msdn.microsoft.com/en-us/library/zfz60ccf.aspx

Creating an msi containing windows service and other dll files

I have a windows service that installs and runs fine. I want to create an installer/msi bundle that contains the windows service + other .dll files. And when I run the msi, I want it to run the service and the dlls'.
Currently I am at a point where I have a SetUp project which can install and uninstall the windows service that I created. And the dlls that are being used for a specific task also work fine individually. I want a package that would initiate these 2 tasks.
Do I need to use any third-party package creation wizards? Please guide me to achieve this.
Thanks in advance.
I don't understand what you mean by "specific task" regarding your DLLs, since DLLs are not executed directly... does your service depend on those DLLs?
I don't want to do commercial but I used http://www.advancedinstaller.com/ with the enterprise license (1k$) for very very easy complicated MSI functionality.
What are you doing with those DLLs? Just install them?
//
Well you can easily deploy your service and related DLLs, and registry settings, .... with that tool i mentioned, but its not for free. But this should be possible without it, I just don't know any tool that gives you an easy interface to creating such MSIs. I don't have any experience with the Visual Studio integraded MSI generation / install projects.
You could "try" the trial ;) The basic/free version does not support this.

VSTO solution using ClickOnce via IIS 6 fails to download manifest

I have an Office solution for Word 2007 that I publish using ClickOnce. When I publish it to a local directory, I can install the .vsto file and everything works. When I publish it to our web server, though, I cannot install it. The error I get is:
Downloading file:///C:/DOCUME~1/Dave/LOCALS~1/Temp/Application Files/MyApp_1_0_0_0/MyApp.dll.manifest did not succeed.
I have been Googling for most of the day, and have already tried the following:
Added the correct MIME types to IIS 6 config (as described here and here on MSDN).
Created a test certificate, imported it into my trusted root authorities, and signed the app with it.
Published the solution to a network share and tried installing from there. It worked fine.
Tried accessing the MyApp.dll.manifest file directly from the web URL. The browser is able to find the file just fine.
What am I missing? Thanks.
Make sure that Windows Installer 3.1 is installed on the end-users PC. If it's not, you may want to add it as a prerequisite to your application.
Also, you may want to check and see if the application is installed from the Windows Add/Remove Programs screen. If it is in the list, you may need to uninstall the application, first. I know, you're probably thinking 'But the application hasn't been installed yet.'
Quite a few application that are published via ClickOnce. ClickOnce works great most of the time, but every now and then I see users who run into hiccups similar to yours when they try to initially install the application. The best solution is to usually uninstall all prerequisites, reboot, manually re-install the prerequisites (not from the ClickOnce setup.exe file) and then launch the application.
Some of those steps may not be necessary but it tends to fix the problem nearly every single time.

Install Outlook addin and exe

I'm currently using ClickOnce to install myapp.exe. But now I've added Outlook 2007 addin support, myaddin.dll.
So, how can I install both exe and addin with ClickOnce.
I don't think you can package them together per se. That's not supported (yet). But what you CAN do is deploy them to the webserver separately, and then have the desktop application invoke the install link for the Outlook Add-In when it runs. Just do a Process.Start("iexplore.exe", "http://myapp.com/myaddin.vsto")
It might get complicated depending on which version of Office you're deploying for.
I think it can be done by adding the .exe project as a dependency of the addin project. I read a little that said that's the way it's done, but haven't tried it personally.

Resources