Make an Installation program for C# applications and include .NET Framework installer into the setup
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
install .net framework 4.5 along with project primary setup
Advanced Installer has builtin support for Prerequisites, .NET is in the list of predefined ones. However, you need to create at least a Professional project type.
Once you have that project type you can add .NET as prerequisite and the setup will get the EXE and launch its installation, if it is missing from the target machine.
Related Topics
How to Convert Epoch Time in C#
Unsubscribe Anonymous Method in C#
Can You Overload Controller Methods in ASP.NET MVC
How to Round a Number to Two Decimal Places in C#
Remove Element of a Regular Array
Filtering Datagridview Without Changing Datasource
Splash Screen Waiting Until Thread Finishes
How to Get Output from a Command to Appear in a Control on a Form in Real-Time
Make a Borderless Form Movable
Get the Correct Week Number of a Given Date
Creating a Dpi-Aware Application
Setting a Property by Reflection With a String Value
Why Does C# Forbid Generic Attribute Types