How to find the Windows Installer XML node in Visual Studio 2019 after toolset and extension installation? - wix

I am trying to create an installer with Wix and Visual Studio 2019. I am a Wix newbie so I just started to get something really simple working, from scratch. Therefore, I read this explanation. I use Windows 10 build 19042.
Creating the winforms project does work fine for me but the next project does not. This is because of this step.
Choose the Windows Installer XML node in the Project types tree,
then select Setup Project
I can find Wix projects.
And I installed the Wix toolset.
So creating a very simple installer should be very simple. But in fact, it is not as I fail to do one tutorial step referring to a project type I cannot find.
You can help in these ways:
Tell me what to do the make sure the Windows Installer XML node
becomes visible.
Provide the step to do the same without the Windows Installer XML node.
And logically, I double checked if the Windows Installer XML node is really not there. And it really is not.

VS2017 vs VS2019: I guess that explanation was written for Visual Studio 2017 - which is quite different for the "New Project" dialog. You can select "WiX" in the drop down button that says "All languages" in that dialog
WiX Project Types: Just double click the "Setup Project for WiX v3" - this is the project type that creates an MSI. The "Bootstrapper Project for WiX v3" is for making setup.exe bundles.
WiX Downloads: For the record, make sure you have installed both WiX itself and the WiX Visual Studio Extension. It looks like you already have (just mentioned for others who see this).
WiX Training: I have a few answers on WiX crash course and training material:
Short WiX sample links
Long WiX Tips and Tricks and samples links
A few selected examples from github (there are more WiX projects at the root level):
https://github.com/glytzhkof/WiXDefaultDialogsSample
https://github.com/glytzhkof/WiXLaunchConditionTest

Related

WiX toolset: How to execute multiple exe files with MSI package

I am working on my first MSI builder with WiX. I am hoping that I can receive some help on what I am trying to achieve.
For my app, the user has to have Visual Studio Code (latest) and a couple of other applications on the local machine. Therefore, I included .exe file in the MSI package like the screenshot below.
I am wondering if there is a way to run those execution files as a part of Microsoft Installer download...?
I am using Visual Studio 2017 and WiX toolset to build a Microsoft installer.
I appreciate any comments or resource that I can look into.
Best regards,
You'll need a bootstrapper (setup.exe) to properly get them preinstalled along with installing your app's MSI. You can generate a bootstrapper using a WiX bundle.

How to create .msi installer with WiX

Can someone help me understand how WiX works? I have a directory structure which I would like to create an installer for. I have generated the for the directory structure with heat.exe and when I build the setup project it generates an .msi file but I don't think it installs anything.
Maybe someone can walk me through the steps of generating a .msi installer.
Any advise is appreciated,
Thank you
If you're using Visual Studio:
Install the WiX Toolset V3 Visual Studio plugin.
Install the Wax interactive editor.
Build your project if you haven't already.
Add a new project to the solution containing the project you want to create an installer for.
Choose the template Setup Project for WiX v3.
Name the installer. A personal convention is the name of the project plus ".Setup"
A Product.wxs file will open up. Change the Manufacturer="" value to something like your company name or your name. Keep the file open.
Go to Tools -> WiX Setup Editor
On the left under Root Directory choose InstallFolder
Under Projects to install, choose the project you want to install.
In the red area to the right, you'll see a list of files. These are the output results of your build from step 3.
Click the plus sign next to files you want to copy. They should turn white and change to a Resolved state.
This might look daunting, but you're just telling it what to copy--which would be your project's executable, configs, dll libraries, and images it's dependent upon.
You typically want to copy everything. If there are dll's you know you don't need, it's better to remove them as a dependency from the Visual Studio.
Notice the Product.wxs has changed. It now has the files you checked off in the Setup Editor GUI added to the <Wix><Fragment><ComponentGroup> section. Save that file.
Close the Setup Editor.
Build the setup project you just configured.
Open Windows explorer and go to that project's bin/Debug or bin/Release folder, depending on what mode you built in. There you'll see the .msi that you can copy to where you need.
To make an update, make the necessary changes and then change the version number in that project's Properties -> Application -> Assembly Information. Then also change it in Product.wxs <Wix><Product.Version>. Then just build your setup project again.
Good tutorial here:
http://wix.tramontana.co.hu/
http://www.codeproject.com/Tips/105638/A-quick-introduction-Create-an-MSI-installer-with
They should get you started.
If you learn something about the MSI log that will also help - install the MSI with a command line that includes /L*vx
And "doesn't install anything" should be easy to check - are there are any files installed, or did it create an entry in Programs&Features?
WiX is a language (XML/XSD) that serves as a way of authoring (compiling) Windows Installer (.MSI) databases. WiX doesn't install anything, MSI does.
I maintain an open source project called IsWiX. The concept is simple. IsWiX provides additional WiX project templates (scaffolding) and graphical designers to assist you in creating installer. Then as you gain knowledge of WiX and MSI you can make additional tweaks of the WiX XML by hand and go beyond what IsWiX currently knows how to author.
Here's a video showing how to author, build and test an MSI to deploy an IIS website in a mere 3 minutes.
Update: IsWiX has tutorials now.
After a few 'false starts' trying to learn WiX from online tutorials I noticed that on http://wixtoolset.org/ there is a link to the book "WiX 3.6: A Developer's Guide to Windows Installer XML". You can buy it pretty inexpensively in E-book form from Packt, or also Amazon if you like the easy interface with Kindle.
I found this book to be VERY helpful with every little step regarding the .msi creation process. The book will guide you to create your first .msi in the very 1st chapter! Granted, you have to continue a little more to have a fully functioning .msi, but given the complexity of Wix, this book is terrific. It may not be for the gurus among us, but for those of us who need a little more help to understand the material it's wonderful. I've seen many posts speak to the 'steep learning curve' regarding WiX and it is a complicated process to create a valid .msi, but this book goes a long way toward making that learning curve very bearable.
If you are using the build system 'cmake', then you can use cpack to generate .msi file by setting the cpack generator to wix.
What worked for me best, was this fantastic tutorial video: https://www.youtube.com/watch?v=6Yf-eDsRrnM
Its best selling points for me was
independent of visual studio version
it describes deploying a .NET (Core) app also
it focuses on what an average app's installer should be capable of (including heat, icon, background image and banner)
you don't have to learn another layer on wix
it gives you good practices on easy package generation and future maintenance
it gives an installer project template which you can reuse: https://github.com/angelsix/youtube/tree/cecd38ea3d5eea11cc75fc0123297ffc3b5e662b/C%23%20General/Windows%20Installer%20Wix%20DotNet%20Core/ConsoleApp1.Installer

Sample application for WiX bootstrapper for beginners

I'm very new to WiX based applications, and I need to create an MSI file where it has to check for .NET Framework 4.0 and SQL Server 2008. If they are not installed, I have to get them installed first and then have to install my application's EXE file and one more VBScript agent. It must be done like when you install WiX 3.7 setup (if we double click the setup file, it will show a UI as shown below!
Where do I start? Is there any step-by-step guide to develop this kind of application?
You'll need the following projects. They can be created from project templates in Visual Studio. Each of them would probably have separate tutorials that you might find with a Web search.
A WiX Setup project to build an .msi. The source files for such a project declare a WiX/Product. It could have conditions that check for .Net Framework4.0 and SQL Server 2008. If a check fails, installation of the .msi will fail, which is all that can be done in an .msi. The project would include your application .exe as a Component.
A WiX Bootstrapper project to build an .exe. The source files for such a project declare a WiX/Bundle. In the bundle is a Chain of installers, which would include .Net Framework4.0, SQL Server 2008, your .msi, and your VBScript Agent.
A WPF Library project to provide a BootstrapperApplication implementation with a custom UI for the bootstrapper project.
Your best bet is to consult the documentation, the WiX source code and various tutorials. Keep in the mind that tutorials might be out-of-date--in most cases WiX has gotten simpler with each version.

WiX Burn 3.6 beta - custom UI examples

Are there any good references/examples for WiX Burn 3.6 custom UI?
I googled around, but they are broken pieces of the information.
The WiX installer itself is a good example and the source is freely available via CodePlex (WiX 3.6 Beta). Check out the WixUX project, which is the bootstrapper for the WiX 3.6 install. Another Stack Overflow question is Custom WIX Burn Bootstrapper user interface?, describing how to get started.
Or if you get the latest weekly WiX releases, the project has been renamed to WixBA. See src\Setup\WixBA.
Yes, they are scattered all over. I am using Visual Studio 2010 to maintain my Product.wxs with a separate WXS file for the UI. Basically I've downloaded WiX Edit to design the UI.
A good start is to download the WiX source which has WXS UI files you can load into WiX Edit to see how they work. You can download the source from here.
What I did was to copy one of the WixUI files to my project in Visual Studio 2010. When you download the source they can be found under wix36-sources\src\ext\UIExtension\wixlib. In here you will find:
WixUI_FeatureTree.wxs
WixUI_InstallDir.wxs
WixUI_Advanced.wxs
WixUI_InstallDir.wxs
WixUI_Minimal.wxs
WixUI_Mondo.wxs
You can tell from this the dialog flows. However there are the individual dialog files in here such as:
CancelDlg.wxs
BrowseDlg.wxs
You can load these into the Wix Edit to preview the dialog. You should get a better understanding.
Additionally, the main Wix Page can be found at Wix Toolset.
I have ordered the Wix book, WiX: A Developer's Guide to Windows Installer XML, from Amazon which I hope will help me understand this more. £30.99 in the UK. Hopefully, this book will be money well spent. There is one review with five stars so fingers crossed.

What are the options to build an installer on a build-server without Visual Studio

It seems like it's still not possible to build .vdproj on a build-server without having Visual Studio installed. However, using Wix seems to be a lot more complicated.
Are there any other options to do the following task:
Visual Studio 2010 Solution with multiple projects (.csproj)
Many loose content files (not inside assemblies)
Installer must be built on Build-server without Visual Studio on it (devenv.exe / devenv.com)
Installer must create Registry keys
Installer must associate file extensions with installed product
Installer must support upgrades (version upgrades)
Installer should be able to register COM components
Installer should be able to pre-JIT assemblies
My goal is:
Effort to maintain installer is low
Minimal changes if new project (assembly) is added to solution
Ideal: no changes if new content files are added to any of the projects
Maybe I just did not get the point with Wix, but including project output (like in .vdproj) seems very complicated.
Any suggestions very much appreciated!
OK I decided to go with Wix. Found out that using Votive it's possible to include project output like in .vdproj (Binaries, Content, Symbols and even Source Code).
If I run into more complicated situations where this isn't sufficient, I could fall back to some kind of harvester (Heat, Paraffin).
See some more Links in comments below (too little reputation to post more than 1 link in this post).
Check out InstallShield 2010 Limited Edition ( Free for Visual Studio 2010 users ). It has pretty much all the functionality that VDPROJ ( being retired btw ) has and supports silent builds. You can get one license for your dev box and one license for your build machine pretty easily.