StandAlone c# application [duplicate] - c#

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.

Related

How to add add some msi application to visual studio InstallShield Redistributables?

I used Visual Studio 2015 InstallShield Limited Edition Project to create my application setup.
My application must be installed api.msi, .net3.5 and .net4.5 to be exeuted.
In "Specify Application Data->Redistributables", I only can add .net3.5 and .net 4.5 to my setup. but i can't add api.msi to Redistributables.
How do i add api.msi to Redistributables?
this is my Redistributables
I hope the installation steps are as follows
run setup->set install path->install .net(3.5 and 4.5) & api.msi & application.
Best way to do it is by creating merge module and add it to your project for details refer the link
InstallShield can include either merge modules or prerequisites, but the Limited and Express editions do not include the capabilities to build either. Both options are available with the Professional and higher editions, and other tools may be able to create merge modules.
You can download an eval copy of InstallShield and throw it on a VM. Build your setup prereq file (.PRQ) for it. Copy the PRQ and api.msi to your machine with InstallShield LE and consume it.
You can read more about how to author a PRQ here: (Disclosure: My blog article from 11 years ago)
http://iswix.com/2006/11/21/using-installshield-12-to-install-net-framework-3-0/
I maintain an open source project called IsWiX that creates graphical UIs for managing XML documents. I thought about creating a tool to maintain PRQ files. It would only take me a day to write it but I was concerned Flexera might get really irritated. :)

Visual Studio Installer Projects Extension - Install a Service

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.

Creating an installation package for a Visual Studio 2008 C# application and another installation for Mschart ALL-IN-ONE... Is this possible?

I have Inno Setup installed and also Advanced Installer 10.9 (Professional edition), and was wondering if I can create a multi-installation setup package that has both my application and Mschart? I have tried to simply create a single package that contains the _Mschart_file, but when another computer (user) doesn't have it installed already (Mschart), it won't allow you to view the graphs. I've read about Merging Modules in the Advanced Installer 10.9, this program is also really slick and PRETTY! So would prefer to use this.
So, when the user opens up setup, It will install the application first then Mschart (vice versa) sequentially.
In Visual Studio you can create a boostrap package with your prerequisites and add it to tour msi package. The installer will detect where your prerequisite is installed or no and take the appropriate decision.
See this article for more info:
http://msdn.microsoft.com/en-us/library/ms165429.aspx

How to deploy .Net Windows Application

Please, Is there any book or tutorial for deploying .Net Windows Application/Assemblies.
I required In-Depth tutorial for .Net Application Deployment.
If you are looking to produce an MSI redistributable installer for your clients, or Group Policy deployment then I'd recommend learning the WiX system.
The Visual Studio Setup Project is no longer supported in VS11 (VS2012) and the free InstallShield alternative has less features than the VS10 setup project.
Go here http://wixtoolset.org/ and here: http://wix.tramontana.co.hu/tutorial/getting-started/the-software-package to learn how the XML file is constructed, then start adding your files into the WiX package.
The toolset http://wixtoolset.org/releases/v3.6/stable download includes a VS11 project template which integrates nicely with VS and whatever source control you're using.
Hope this helps a bit!
Follow this. You will be able to deploy with Setup Projects
http://documentation.devexpress.com/#xaf/CustomDocument3235
I'm on a mobile phone so I cannot provide you with a link but all you need to do is copy the executable out of the bin folder in your project.
Deploying A C# Application (Visual Studio Setup Project)

free windows installer

I have found a lot of programs to make an installation package for .net application but non of them meet my requirements.
I'm looking for a free application which is able to create installation and uninstallation package and is able to check if net framework and sql 2008 Redistributable is installed if not application should be able to install them first and then start application installation process
Take a look at Wix.
It is free, but the initial learning curve may be a little bit harder then other programms. The output of WiX is a *.msi package.
I recommend Inno Setup - I compared it once with NSIS and found it more usable. It suports scripting, and you will find example scripts for installation of .NET and other redistributables through the search engine of your choice.
Did you try installer, that is shipped with visual studio? If it is very simple, try Wix. Aslo, consider NSIS.
Or Windows Installer?
If you have Visual Studio installed then you can simply create a setup project within your solution. If not, then download from the above link (or fine the appropriate version to download) and utilise the set creation application manually.

Categories