I have a VS2019 project that code signs using Windows 10 Kit's SignTool.exe, and builds an installer using Inno Setup. This is part of the projects PostBuildEvent. How would I do this properly in a hosted DevOps Build pipeline?
The project file's PostBuildEvent is below:
<PropertyGroup>
<PostBuildEvent>
if "$(ConfigurationName)" == "Release" "$(ProgramFiles)\Windows Kits\10\bin\x64\SignTool.exe" sign /n "SomeCompanyName" /tr http://timestamp.comodoca.com/authenticode /td SHA256 $(TargetDir)Test1.*.dll $(TargetDir)Test1.exe
if "$(ConfigurationName)" == "Release" "%25ProgramFiles(x86)%25\Inno Setup 5\iscc.exe" "$(SolutionDir)Setup\Setup.iss"
</PostBuildEvent>
</PropertyGroup>
I have a DevOps build pipeline that is using a "Hosted Windows 2019 with VS2019" agent pool, it has "Microsoft.VisualStudio.Component.Windows10SDK.17763".
I could create a command line task to invoke the SignTool.exe using an updated path. How do I handle the Inno setup installer?
How do I handle the Inno setup installer?
You could install Inno Setup via Chocolatey during building on hosted agent.
The VS2019 image has Chocolatey 0.10.11 installed on it, this should a good way to install tools during a build if you can find your tool as a package there.
Besides, Inno Setup does support being installed via Chocolatey. You can see that on the packages page here. That green bulb at the top of the page is an indication that this package version correctly installed via the automated processes that Chocolatey has, verifying that a package installed correctly.
You can check the ticket Add Inno Setup to Visual Studio 2017 Images on Github for some more details.
Hope this helps.
Related
I am creating an MSI installer with Wix and wrote a task in the azure DevOps pipeline which builds the MSI solution file using MSBuild. When the code is pushed to remote the pipeline runs the task but my task returns the error saying WiX toolset is not installed hence the build fails. Though it is assured that the MSBuild task works as it is building other projects in the solution.
##[error]Process 'MSBuild.exe' exited with code '1'.
##[error][Path to wixproj](44,5): Error : The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/
Is there any way to install Wix toolset using pipeline?
Or any workaround which might help?
Please note that I am using a custom job pool if that might be a cause for this issue.
Check this article from the official wix documentation.
Most likely, the issue is that your .wixproj is out of date and thus does not handle the breaking changes made in MSBuild 2017. You can re-create your .wixproj using the latest templates in Visual Studio or walk through the steps laid out here.
Essentially, you need to update the way that MSBuild imports the wix.targets because MSBuild 2017 changed the way they did that.
Few machines have 'MyApp.exe' installed using ClickOnce. And I have created a new MSI Windows Installer for 'MyApp.exe' using MS Visual Studio 2013 Setup and Deployment. I have a requirement that when my new MSI Installer runs it has to automatically remove/uninstall all previous 'MyApp.exe' (installed using ClickOnce) and install the new exe. Installer has to do it as part of its installation process.
Is this even possible? ClickOnce doesn't make any registry entries, so how can I get the Upgrade codes/Product codes which I can feed to Windows Installed 'Upgrade Paths' to upgrade it. ClickOnce is per user installation, but Windows Installer is not.
Is it even possible for Windows Installer to uninstall ClickOnce installed application ?
Any help is greatly appreciated. Thanks
ClickOnce is a per-user deployment experience and MSI is usually a per-machine experience. Per machine can't clean up other people's profiles. The only way I know is to do an active setup trick to run a program for each user who logs on and then execute a script to do cleanup. Either that or put first-run code in the applicaton itself to do the same.
I have a build definition on visual studio online which creates an msi installation package using WiX.
How can I automatically deploy the msi package from VSO build agent to Azure VM after the build completes successfully?
Note: I prefer to use a post-build batch or powershell script as part of the build process. The script should copy the msi to the vm and install it.
You should use Release Management Online. It comes with VSO and allows you to easily orchestrate installing an MSI on any Azure server.
http://nakedalm.com/building-release-pipeline-release-management-visual-studio-2013/
Microsoft just added RM in VSO and its simple to use. I setup an end to end web app deployment, buy as its just a PowerShell to do the install an MSI would be trivial. RM takes care of getting all of the bits to the right spot...
http://nakedalm.com/create-release-management-pipeline-professional-developers/
Honestly, it sounds hard, but is much easier than trying to do it all yourself.
Can you please enlighten me on my task?
My task is to create a nightly builds of MSI (done in WiX) and install it to our web server using powershell.
TFSBuild server build an MSI
Run Powershell to uninstall and install the newly build MSI.
Run Powershell to Start the windows service.
The WiX MSI contains WindowsService and a Web Application.
Below are list of what i have done so far:
Solution.sln : Configuration Manager and "x86|debug" (check all the files that needs to be built '.wixproj' already checked)
Created a build definition and set "x86|debug" for configurations to build and set projects to build is my solution file.
but after the build has completed, there is no MSI files on the binaries build folder on the build server. :(
Thanks in advance.
Few pointers:
Have you installed Wix on the buildserver?
Which version of Team Build are you using? 2010 has the preference here as the tooling has progressed a lot since 2008.
Did you configure to run msbuild in auto or x86 mode (auto can result in 64-bit which has some issues with the latest stable version of wix) link link
Is your build agent running on a 64 bit server? If so, you either need to run the build agent under an administrative account or do some mucking around in the registry to fix issues with Wix. link
To install the build using Powershell, I personally prefer TFSDeployer, which can monitor your build output and trigger powershell scripts based on the build outcome. It takes away the deployment responsibility from the build server and saves a lot of headaches around security and account configurations.
I have made website deployment project for ASP.NET 3.5 website. After build i have found two setup 1. MyApp.msi and 2. MyApp.setup.
At deployment PC when i just copy and paste only setup file it will prompt error message for finding msi.
After copy msi when i again run setup i will install successfully.
I am not able to find why we need to have both setup and msi at deployment PC?
You actually only need the .msi for successful deployment. The setup.exe file is only used to detect if Windows Installer is available on the machine, then it launches the msi.