I have an application C#. This application use a Project "Visual Studio Installer/Setup Project" for the setup. I have to change it for a "Windows Installer XML/Setup Project".
The VS Installer use
a Custom Action
a class public partial class InstallerDB : System.Configuration.Install.Installer. Used to install the database
Maybe something else (I don't really understand how this installer Works"
I created a WiX project. In the product.wxs I added a call to the custom action. But how can I call the project with the class InstallerDB ?
And how can I be sure to do exactly the same setup ?
WiX doesn't support installer class custom actions for many reasons, primarily because the Windows Installer team didn't support them and they arrived only in Visual Studio setup projects that Microsoft attempted to get rid of.
WiX has its own support for managed code custom actions derived from the DTF effort to make them more acceptable for Windows Installer, so convert your custom action to this format. Examples are:
https://blogs.msdn.microsoft.com/jschaffe/2012/10/23/creating-wix-custom-actions-in-c-and-passing-parameters/
http://www.codeproject.com/Articles/132918/Creating-Custom-Action-for-WIX-Written-in-Managed
If you install services with custom action installer classes then don't bother - WiX supports the built-in Windows Installer features to do this (which Visual Studio setups never did). See the WiX ServiceInstall element, and ServiceControl for stopping and starting. The fact that Visual Studio setups use installer classes can give people the impression that they are required for installation of .NET services, but that's not the case.
Related
I have a C# application and I have some applications like MySQL, MariaDB etc. that I use with my C# application.I want to make a SETUP file that contains my C# application's EXE file and other applications' (MySQL, MariaDB ..) setup files in one setup file.That setup file will install all of these applications with one setup file.
I have tried with Visual Studio Setup Wizard but I can't manage.Can I do that in Visual Studio?If I can, How can I do that?Should I download a visual studio extension?
You can create Setup by installing WIX tool and Install the Visual Studio extension and follow the WIX syntax
If you need to Include multiple EXE files in Setup you need to refer all the files that u needed in Setup.
If you need to install those setup then you need to create the custom action.
you can create a separate project for a custom action and added the references to the required binaries (ie the Binaries you previously mentioned in tags) and added the corresponding dll formed in the binary tag and called it via CustomAction
It's not clear if you've downloaded and installed the VS 2017 Installer Extension from here:
https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MicrosoftVisualStudio2017InstallerProjects
which lets you create Visual Studio installer projects (not the setup wizard). I suggest you search for tutorials on setup projects if you're totally unfamiliar with them, such as:
https://msdn.microsoft.com/en-us/library/cc766795.aspx
http://www.c-sharpcorner.com/UploadFile/1492b1/creating-an-msi-package-for-C-Sharp-windows-application-using-a-v/
https://www.red-gate.com/simple-talk/dotnet/visual-studio/getting-started-with-setup-projects/
In general you just drag and drop your files into (say) the Application Folder in the File System view; registry entries can be created using the Registry view. Prerequisites such as SQL runtime support. .NET runtime are added with the setup project's properties, choosing from the list of prerequisites.
This will give you a basic setup with little customization. There might be features you require that Visual Studio setups don't support, so something like WiX will give you a lot more functionality with a steeper learning curve if you've never created an MSI setup file before. I would search for a tool that fits your requirement, and this thread might help:
Best tool to create MSI
I have an Windows C# application for which I will have to create an installer
which would ask user for custom and complete installation.These custom and complete installation options are same application with different feature.
I know to provide options by using Installer UI radio buttons but how to provide control as it takes specific exe for the custom and complete installation respectively.
Or is there any way to achieve this, appreciate if you would provdie step by step procedure.
I am using Visual studio 2013 premium version, MySQL 5.5.
You have different ways, you can do it by configurate in VS. But on this I canĀ“t say much. I would prefer to use a NSIS-File or MS-Build to create an setup.exe
With NSIS you can say all Options etc. which the installer should include.
Here is an NSIS tutorial. Hope that helps.
There is no support for custom dialogs in Visual Studio setup projects - they are limited feature setup projects that do not supply access to the full functionality of Windows Installer. Any installs you see with those Custom and Complete choices (or choices of which features to install) will not have been built with Visual Studio setup installer projects. That means you'll need to choose another tool that meets those requirements, and any others you might have for the install.
I'm using the Visual Studio Installer Projects Extension to create a .msi for my project.
The installer seems to work ok for the most part, but it won't kick off my service after install and I have to run MyService.exe manually.
Is there a way to do this? Or could I inject some custom installer code somewhere?
Viusal Studio Installer projects don't expose Windows Installer's underlying ServiceInstall / ServiceControl tables. This forces developers to reinvent the wheel using custom actions resulting in fragile installers.
Windows Installer XML can author merge modules that properly implement ServiceInstall / Service Control. You can then reference that merge module into your Visual Studio Installer to accomplish the task with breaking best practices. A discussion of this can be found here:
Augmenting InstallShield using Windows Installer XML - Windows Services
Redemption of Visual Studio Deployment Projects
IsWiX Tutorials - How to author a Windows Service using WiX / IsWiX
Microsoft has described the process of creating a service installer in this MSDN article: How to: Add Installers to Your Service Application
See if this helps:
http://www.installsite.org/pages/en/msi/tips.htm
Scroll down to Installing Services with Visual Studio.
It's a tool for adding the ServiceInstall/ServiceControl features to a VS setup. I haven't updated it for a while but all the source is there.
I've finished my C# application, but I have a little problem:
When I try to run my application in another PC, I need always to Install .NET Framework 4.0.
Is there something to do to make it work without installing the framework from internet?
I tried before InnoSetup for a VB6 application, but I'm not sure if it's going to work for .NET 4.0!
Any ideas?
Use Visual Studio Setup project. Setup project can automatically include .NET framework setup in your installation package:
Here is my step-by-step for windows forms application:
Create setup project. You can use Setup Wizard.
Select project type.
Select output.
Hit Finish.
Open setup project properties.
Chose to include .NET framework.
Build setup project
Check output
Note: The Visual Studio Installer projects are no longer pre-packed with Visual Studio. However, in Visual Studio 2013 you can download them by using:
Tools > Extensions and Updates > Online (search) > Visual Studio Installer Projects
You need to create installer, which will check if user has required .NET Framework 4.0. You can use WiX to create installer. It's very powerfull and customizable. Also you can use ClickOnce to create installer - it's very simple to use. It will allow you with one click add requirement to install .NET Framework 4.0.
WiX is the way to go for new installers. If WiX alone is too complicated or not flexible enough on the GUI side consider using SharpSetup - it allows you to create installer GUI in WinForms of WPF and has other nice features like translations, autoupdater, built-in prerequisites, improved autocompletion in VS and more.
(Disclaimer: I am the author of SharpSetup.)
Include an Setup Project (New Project > Other Project Types > Setup and Deployment > Visual Studio Installer) in your solution. It has options to include the framework installer. Check out this Deployment Guide MSDN post.
i want to know how to create a installer similar to visual studio 2010 setup file.
thanks in advance.
There is an open source script driven project called Wix which you could use here: http://wix.sourceforge.net/
There are some additional MSI installation file utilities.
Hopefully this helps.
WiX toolset is used to create Windows Installer based installers, MSI files. Visual Studio setup uses MSI to make changes to the system. Although MSI is very powerful, it provides limited UI experience, which, however, is quite enough for most setups.
Visual Studio setup uses a regular application that collects information from the user. Then it uses External UI (see MsiSetExternalUI function) to monitor and display progress of the installation.
Look at Setup guidelines and make your setup experience as simple as possible, but not simpler.