Adding a setup project in your solution C# - c#

When creating a setup project in your solution how do you make the setup to check if the appropriate .Net Framework is installed on the PC you are installing your application

There's a Code Project article explaining this. The article might seem outdated, but the idea and the location remains the same.
Basically, there are options in your setup project properties to select which prerequisites to install and to add custom ones.

It depends on the Setup engine. If you are using InstallShield LE then there is an option in the redistributables (or mebe dependancies) section.

Related

Visual studio installer project multi language support

I have a c# WPF application which is able to switch in deferent language as per customer wants. I also created a setup project for the same. I need to make the setup project also be able to switch language.
The problem is, the 'Visual studio installer project' doesn't have an option to do that. There is an option to set language for MSI. However dynamically changing the language is not supported
I have already googled it and no solution found.
some of the similar posts links are below. which also have no correct answer
c# Setup Project Localization
How to create preview choosing setup language in Visual Studio Project Installer?
Any idea how to do that. Thanks in advance
I don't have much experience regarding this, but:
The Wix installer seems to have support for localization:
https://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/
VDProject seems to be the right way to move forward aswell:
https://devblogs.microsoft.com/buckh/visual-studio-setup-projects-vdproj-will-not-ship-with-future-versions-of-vs/

Include missing dependencies in VSTO setup

I created a basic install for my VSTO Excel plug-in by publishing my project.
It pretty much worked ok except for some reason it missed 2 dependencies, dll's which are needed to communicate with our SAP system.
Did loads of Googling but I can't find a way to add them in Visual Studio.
I tried downloading the setup project type from MSDN, but wierdly when I built the install it included the SAP dll's but it didn't install my plug-in! There doesn't seem to be much info on how to do this with VSTO, or at least I couldn't find it.
However I note from MSDN that there are a lot of problems with that template, so it's possible it doesn't work for VSTO stuff.
So, a workaround is obviously to run both - and that works ok - but it isn't ideal and (understandably) not satisfactory for our support team.
I would think there are several ways to fix this problem, so if anyone could answer one or two of the following that would really help!
How can I make sure that my dependency files are included in my setup when I use Publish?
What is the correct way to create a Visual Studio 2013 Installer Project
that works correctly with VSTO?
This looks like an answer to question 2:
https://msdn.microsoft.com/en-us/library/ff937654.aspx
1.How can I make sure that my dependency files are included in my setup when I use Publish?
You need to add them as a content to the target folder or make sure that files are copied to the output folder with the add-in assembly. Right click on the reference in the Solution Explorer window and see the reference's Properties. Pay special attention to the Build Action, copy to the output folder properties and etc.
2.What is the correct way to create a Visual Studio 2013 Installer Project that works correctly with VSTO?
The Deploying an Office Solution by Using Windows Installer article describes all the required steps for deploying Office add-ins.

WIX Template project Cannot be found

Im working on Windows Service Project using VS2012, and when im trying to Add a Setup Project to complete my Solution
I found that I cannot add This Template to the Solution i Donno why!
I just Get this Error message
I Just Dont know why they suddenly decide to remove Setup project template away from VS2012
Does this depends on current framework used 4.0 ?
I'm working on 64bit System.
Those templates are not from the WiX toolset. They were created by someone that used our icons to make them look like officially supported templates. I asked that the author make it clearer that they are not part of the WiX toolset so there was no confusion aobut who supports them. I've had reports that those templates are high quality.

How to create an installer and uninstaller for a Windows Forms application

I created an installer for my Windows Forms application and I added the project output to programs menu. But now what I want is 'I should have a folder in programs menu in that it should contain both install and uninstall options'.
Please help me. Thanks in advance.
The easiest way is to create a Setup and Deployment project in Visual Studio.
I have to agree with Sir Richard's answer, but I wanted to add the instructions on how add an uninstaller using the Setup and Deployment project found in Visual Studio.
Here's a useful link you can work on: How to add a Uninstall option in Visual Studio Setup project without writing code
If you have advanced scenarios that the Setup and Deployment project can't handle, I'd advise looking into WiX.
WiX is an extremely mature Microsoft opensource project, having first launched in 2004 and is still active today. It even provides a VS extension to assist you with getting started and intellisense for the configuration.
Be warned though: WiX primarily uses XML files that use MSI's domain language. It's certainly not a tool you use if "create an installer" wasn't allocated specifically in your project plan.
You can try with NSIS, is open source and very easy...
"NSIS (Nullsoft Scriptable Install System) is a professional open source system to create Windows installers. It is designed to be as small and flexible as possible and is therefore very suitable for internet distribution."
in his website you can find tutorials and examples, the link is: http://nsis.sourceforge.net/Main_Page
I hope this help you!

Configuration file 'C:\my\App.Config' is being used to configure all executables

I have a Visual Studio setup project that installs an application into the task scheduler and also installs a GUI application to manage some configuration parameters in the registry. This being the case, the setup project installs two different primary outputs (.exe's) as part of the process.
I am getting the following warning when I rebuild the setup project:
Configuration file 'C:\my\App.Config'
is being used to configure all
executables
Is there any way to remove this warning? The suggested MSFT solution apears to be to use a different setup project for each .exe, but I only want the users to have to run one installer. Any suggestions?
There was a <runtime> section in my App.Config file and once I removed this portion of the config file the issue went away.
Maybe you could create an installer that launches all the other installers.
This isn't a particularly helpful on microsofts part is it?
Another idea might be to take their advice and use either no config file or a custom file format so that you avoid this error.
From Choosing a Windows Installer Deployment Tool, it looks like the built-in windows installer maker is essentially deprecated ("Future versions of Visual Studio will not include the Visual Studio Installer project templates.")
This page also recommends InstallShieldLE and Windows Installer XML Toolset. I've just used InstallShieldLE to create an install that includes multiple executables and it appears to have worked (I'll edit this if it turns out it didn't work).
For very complicated installs, I've used NSIS in the past with great success - I'm not sure how much extra effort NSIS requires over InstallShieldLE for simple installs.

Categories

Resources