TFS 2010 - Nightly Builds of WiX MSI for WebApplication/Windows Service and install to web server - powershell

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.

Related

Adding SSIS to a ADO build server for Build and Deploy

I have a VSTF build server which we use to build and deploy our applications mostly C#. I have now been challenged with deploying SSIS packages. From a manual perspective on my laptop we can get things accomplished, but on the build server we are having issues. This has been our guide, but it was written in 2017. https://www.red-gate.com/simple-talk/sql/ssis/deployment-automation-for-sql-server-integration-services-ssis/
We are on VSTF2019, VS2019. On the build server we use only the MSBuild tools, but it seems like SSIS on the build server wants the full UI for VS2019 and SQL Server Management Studio and SSIS.
Our issue is our C-Drive has insufficient space to support these UI's and they don't fully allow us to deploy them to the D-Drive where we have more then enough space.
I am looking for a document or how-to add SSIS (2019) to our build server so that it can be built and deployed using the least amount of space on the c-drive, like build tools. or does SSIS need a build server of its own?
You can use SSDT standalone installer to install Integration Services without a SQL server. See document here for more information.
does SSIS need a build server of its own?
Building SSIS package needs the required tools(VS2019+SSIS) to be installed in the build server. If this is achievable. You can just install the tools in your existing build server.
Or you can just create on-premise build agent on a new build server which has the tools installed.
If you are able to have a build server with Visual Studio and SSIS designer installed. Deploying SSIS packages would be much easier. You can use the SSIS Build/Deploy task directly in your pipeline. See document here.

Teamcity Unmet Requirements: powershell_x86_Edition equals Desktop

I just updated my TeamCity server and I am suddenly getting this error message on my build agent.
I made a copy of the old installation, and the buildAgent.properties are the exact same. The Plugin folder for powershell exists aswell.
Does anyone have an idea on how to fix this?
I had the same problem when moved the build agent from windows to linux, and found the solution here.
In short:
Make sure powershell is installed on the server where the build agent is running.
You can set Platform and (Since TeamCity 2017.1) Edition properties at the PowerShell build step Edit page.
Edition: on windows Desktop, on linux Core
Platform: could be x64 or x86 based on installed version
If you set these properties correctly, it should meet the requirements, and you can use the build agent as before.

Upgrade ClickOnce Application using Windows Installer. Is this possible?

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.

How to deploy an msi from visual studio online to azure vm?

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.

Deployment ASP.NET website: Why *.msi required if setup is there?

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.