# [SOLVED] [C# .Net] Deploy a application with VS 2010



## Emphyrio (May 16, 2009)

Hi 

Since a week, I am struggeling with the procedure to deploy a application in C#.Net with VS 2010.
I have the following dev tool configuration:


```
Microsoft Visual Studio 2010
Version 10.0.31118.1 SP1Rel
Microsoft .NET Framework
Version 4.0.30319 SP1Rel
Installed Version: Professional

InstallShield Limited Edition   
InstallShield.
```
I have tried both InstalShield LE and SetUp Project (from VS2010).
But I can't say that I'm thrilled about them.
InstallShield looks nice, but I can't get it config to do the WI 4.5 and dotNetFx40_Full_setup.exe
prerequisites.

I get the " U have to install .Net 4.0 application" and thats the end of install.
Needless to say, I don't want that too happened on the end user site  

SetUp does give me the two files as a output (in separated folders), but
I can't seem to include a App2 folder (a free third party exe).

I've tried to move (Add) the folder in Bin > Release with no succes.
I've tried MergeModule, but when I ran the setup.exe on my VM, the folder isn't there.
(Application Folder or Program Files(x86)

At the moment, I have spend more time to figure out how to deploy my application, then I did in programming. 
Including lots of articles reading @ MSDN, Dream In Code,....
Not to mention...frustration  


*In summary:*

I made a WF application which includes a free third party exe (exp App2).
Target is x86/x64 (altho the installer doesn't do mixed platforms).
Dot Net 4.0 en Windows Installer 4.5 as the prerequisites.
Both prerequisites has to be installed off-line (no bootstrap)

My setup.exe should include :


MyApp.exe
ReadMe.txt
Eula.rtf
System Requirements.rtf
App2 (folder en files)
Net 4.0 (dotNetFx40_Full_setup.exe)
Windows Installer 4.5

*Events that should be happening when the end user clicks on setup.exe:*


Check on WI 4.5. If not present: Install WI 4.5
Check on Net 4.0 If not present: Install dotNetFx40_Full_setup.exe
Show Licence Agreement and "Agree" dialog.
 Installation of myApp.....
A Folder (MyTool) is made in Program Files(x86) which should include:
App2 Folder (and his files)
MyApp.exe
MyAppUninstall.exe
ReadMe.txt
System Requiremenets.txt
Eula.txt

A Folder (MyTool) is made in Program Start which should include:
MyApp_Shortcut.exe
MyAppUninstal_Shortcut.exe

A MyApp_Shortcut.exe on desktop

I hope someone can throw some light on this, as how to tackle this problem. ray:


----------



## Emphyrio (May 16, 2009)

*Re: [C# .Net] Deploy a application with VS 2010*

I found a solution 

Create a _Merge Module Project _(called it MM) 
In the _File System Editor_, select the _Module Retargetable Folder_.
Make a folder called App2
Here goes the files of the App2 (tirht party)
Build the _Merge Module Project_

Add a new _Setup Project _in your project solution (call it MMI)
Here comes the regular stuff, like primairy output and all the other files you need.
(I gonna step over the procedure too make a regular setup)

Choose _File System Editor_, select the _Application Folder_.
Rightclick on_ Application Folder_, point to Add and choose _Project Output_.
In the _Add Project Output Group _dialog box, choose MM en select _Merge Module_.

Select MM in your solution project and expand the _KeyOutput_ node, 
then expand the (_Merge Module Properties_) node and select the _Module Retargetable Folder_ property.

Click on _Module Retargetable Folder _property and select (_Browse_...)
Choose _Application Folder_
Close with OK.
Build MMI.


----------

