How to Create Websetup for Clickonce type windows forms application by publishing it to some folder - vb.net

Trying to publish a click once type app to a local directory and create a websetup with the published contents- so that i can give tat setup to install in two different servers. but as the publishing wizard takes a URL - separate setup is required for each server. Is there any way that i can create a single setup which i can use it in two servers..?

The URL for setup.exe is only for the purpose of bootstrapping. What I found is that the bootstrapper that gets created with your deployment manifest ('setup.exe') is designed for a web-published application.
If your clickonce publish will be installed on intranet servers, you can't use out of the box bootstrapper. You may write your own or build a seperate setup project for bootstrapping and calling the .application from the installed server when the pre requisites where installed.
If you don't rely on pre requisites and you can ask users to make sure they have the right CLR version, you don't need the setup.exe at all.

Related

How to create installer for ASP.NET Core windows service?

I want to create installer that will install my ASP.Net Core 3.1 app as windows service (the app code already has .UseWindowsService();).
Right now when i publish the app, there are a lot of files and i just use sc create command in cmd to install it as service (specifying .exe path).
I want to create just one exe file that will include installer and files needed for installation. I would like to have some basic ui where you could choose path if you want different path than default. It should start service after installation and set it to start automatically. Before installation it should check if service is already installed and if it is, try to start it and inform user about it.
The located at https://github.com/iswix-llc/iswix-tutorials will handle this. Build your EXE to not require .net core. If you want to install .net core as a prereq instead you'll want to use the IsWiX bootstrapper project template and add .net core to your bundle.wxs.
This short video shows the whole process that's described in the tutorial.
https://www.youtube.com/watch?v=bxbcPnjfzIc

Can I bundle a ClickOnce application into a WiX bootstrapper? How?

Long story short, one of my my employer's clients has an aaS platform that relies on a piece of software that's a ClickOnce app. This particular app is developed by a 3rd party software developer, and licensed to my employer's client company. It also happens to have a large number of prerequisite/dependency applications that need to be installed in order for it to function, but are not deployed as part of the ClickOnce installation. Importantly, because it's developed by a 3rd party and licensed, it's not possible to make any changes to the application itself.
Thus far, actually installing the application on endpoints has been handled by the client company by providing a pre-imaged computer, or when their client wishes to use their own hardware, giving their customer service reps a large zip file containing a bunch of .bat scripts they have to run manually on any computer that's to be used as an endpoint for their service. The batch scripts basically do the job of a bootstrapper and install the prereqs, make necessary system configuration changes and checks, and then call the ClickOnce application installer.
As expected, they don't like this solution, and would like an actual installer, so I've set about creating a bootstrapper with WiX/Burn, but I'm now stuck on how to include the ClickOnce application in my bootstrapper project. I can't seem to find documentation on this online, prompting the question:
Can I bundle a ClickOnce application into a WiX bootstrapper? How?
If it makes a difference, the ClickOnce application is published from one of the client company's servers, so I have full access to both the ClickOnce manifest and all the .deploy files.
You can't make a silk purse of a sow's ear. I think the best you can do is make a dependency installer for a certain version of the ClickOnce installer. No one should expect that a future version of the application would have the same dependencies.
(By that time, though, maybe they'll fix their ClickOnce installer by including dependencies. Or, abandon dependencies that they are having trouble putting into ClickOnce, say those needed for obsolete versions of Windows.)
Once dependencies are installed, you can have the bootstrapper launch the application, which would install or update it. (Logically, this follows the Chain.)
<Variable Name="LaunchTarget" Value="http://example.com/path/product.application"/>
Backing up a bit, you could create an MsiPackage with all of the ClickOnce files, and use a "file://" URI for the LaunchTarget. This would require you to rebuild and redeploy each new version (defeating the nature of ClickOnce), but would isolate you from untested application updates.

clickonce deployment with prerequisites

We have an application that we deploy to a website. User goes to the website and downloads the application to their machine.
There are a few prerequisites such as .net and sql server 2012 express that we just click in the "prereqs" to install. But we also have another executable file syncronization which is an exe that the user needs to install before loading the application. How can we also include that so before the app runs it loads this as well. because i don't see an option to include it, it just has the standard default microsoft ones.
So basically you want to run a .exe file along with your main app???
Or it is like the .exe file should load before when you start the main app????

How to create Web Deployment Package for IIS WebSite and use standard manifest/parameters

I have various IIS hosted service hosts with simple svc files etc. What I want to do is to be able to create deployment packages from our test server using IIS Export Package in a way that parameters may be saved and picked up at Export time so that the Export is repeatable and automatable. I.e. the Export will always use the necessary Manifest extensions such as XmlFile etc.
The web sites exist in the solutions and are then picked up using a Web Deployment project in each solution so that config substitutions are done etc.
We are currently on VS 2008 SP1 so do not have direct access to VS 2010
The first issue I have with MsBuild (running in TeamCity) is how to build the IIS web site (with target=Package) when there is no project file? In this way maybe I can avoid the Web Deployment projects (I use them for various configurations but don't want to do it this way for deploying to Production but rather export from our fully tested staging into a package file to be imported onto a production server).
Secondly, I want to avoid having to configure the Export in IIS 7 each time I run it. I want it simply to pick up the correct set of extensions to use and create the necessary parameters for me. Is this done from a Manifest file? I can see how to use the parameters.xml but I am unclear whether I need to use a manifest.xml (created by hand) and how to link it in. The idea is that a tester/deployment person should be able to do the Export simply without having to enable all of the extensions that are required
Any help or guidance will be greatly appreciated.
Ok, in the meantime I got it figured out.
I ended up using the document at Package an Application for the Windows Web Application Gallery which gave me the means by which I could extend our automated build in TeamCity to create the "repeatable" export packages.
In short I will use the current Web Deployment Projects to create the deployment artefacts and then in MsBuild combine them with the pre-prepared manifest.xml and parameters.xml files into Build artefacts folder and zip them up into a package. From there the task will be to Import the package into IIS Deploy in the target environment.
The parameters.xml file will be used to set the HostName for wcf clients and services, connection strings, app settings etc.
This turned out to be the best solutuion bcause I can put it into our automated build.

building a windows service using msbuild

Can someone point out any tutorials that help build windows services using msbuild.
Requirements :
- Should not use the csproj file
- Output should be the same as the publish option in Visual Studio
Updated question:
We have a project of type windows service in our solution. In this windows service, we are referencing a couple of libraries that reside on a different system (one of them is not strongly named). This solution also contains other class libraries and websites/web-apps.
I am trying to write a custom build that outputs a xcopy deployable version of the website, and a deployable version of the windows service. When I say windows service, it shows up on the Control Panel -> Services MMC.
The website build was easy via msbuild...however I am struggling with the windows service build. Until now, my fellow developers were using the right-click on the project file ,and click publish to publish the windows service. This generates a setup.exe file that helps the admins to deploy the service.
So, now here is my question:
I want to use msbuild to build my windows service.
I do not want to directly use the .csproj file in conjunction with msbuild to build the service.
The output my build file generates should match the output from the "publish" option (*the publish option generates a setup.exe file*)
In general, "the publish option" under the covers just runs a build with /t:Publish, i.e., it triggers a different target to the normal default 'Build' one.
Can you tell us more of what you are looking for, as opposed to not looking for?
Are you looking to generate an MSI? (If so, you definitely won't be using MSBuild if you're using the built-in .vdproj system - but be careful - this means having to put VS on a build server)