Swapan Das
12th September 2007 17:44 UTC
Deployment of a .NET project with NSIS
Dear Friends,
Please excuse me I'm posting this issue without first searching for this issue in this forum as I don't have the time (the office has closed down) and posting this from a cyber cafe. This may not be the right place to raise my issue as its more centeric to .NET deployment but I'm only an active member of NSIS forum.
Intro: I'm using NSIS for my regular VB projects to build installers.
Issue: I've been now given a VB.NET project and asked to create an installer/deployment for it. I just saw after we go for the build of the application, it creates files in the release folder. Also Debug folder contains simillar type of files.
My question is how to go for the deployment? For VB projects I use to register all the respective dll, ocx files in $SYS folder. But for .NET I suppose no registration of dlls required.
I'm thinking of taking the Release folder of my VB.Net project which contains all the dlls along with the application exe and make an installer with NSIS and extract that folder in the installation folder.
like c:\MyApp\Release
MyApp folder will contain the MyApp.exe, etc.
Release folder will contain all those dlls etc.
I've also seen a file MyApp.exe.manifest something like along with MyApp.exe. Then there was some host file.
Actually I'm unable to recollect all the file names right now as had not spent much time with it.
Can someone please help me to let me know the basic way of deploying a VB.NET project with NSIS, and not using .NET's own Deployment option. I've couple of 3rd party dlls also in my .NET project. These files do exists in Release folder, do they need any registration like the VB project ?
At the very beginning with the help of NSIS I'm checking the existence of .NET framework. Its working fine...but I'm stuck how to proceed further.
Sorry for such a long post....plz. help me its somehow has become an urgent issue @ office.
Regards,
Swapan
(ps:If u don't want to read the whole post...then in nutshell the issue is:how to deploy a VB.Net project with NSIS...which files/folders to be taken from VB.Net project and how to deploy them?)
RaggieSoft
13th September 2007 00:49 UTC
What version of VB are you using? There's an article for .NET 1.1 (VB.NET 2003/VB.NET 7.1). I use VB 2005 (VB 8.0) myself.
If you're using VB.NET 2003, then simply head on over to this article: NSIS Development Center
It gets you going with the biggest hurdle, Installing the .NET Framework. ***This is not the same for .NET Framework 2.0 (VB 2005/VB 8.0) since Microsoft changed the installer for .NET 2.0***
The .DLL files and Manifest files are copied verbatim to your installation folder. There is no Registration requirements for any of these files, but they need to be in the same folder as your EXE.
Do not tell your installer to use C:\MyApp (as is your example), but instead, use the Program Files\MyApp folder.
RaggieSoft
13th September 2007 00:51 UTC
Apparently Nullsoft blocked my URL. Simply head here: NSIS home page --> Developer Center --> Code Examples --> How to Automatically download and install a particular version of .NET if it is not already installed
This will only help for .NET Framework 1.1 (VB 2003/VB 7.1)
Swapan Das
13th September 2007 08:33 UTC
Thanks for the prompt reply. We use VB 2005. My issue is not with the .NET Framework installation. Infact my .net application exe is giving an error and not running when I installed it in c:\MyappFolder\MyApp.exe with the help of NSIS installer. Yes my app.exe is fine when runned from its build location. So could you please let me know what are the steps I've to take in VB.NET project build up process and for nsis installation from where I've to take all the necessary files, dependency files ? - is it from the release folder?
Are you sure I can't install my vb.net application any where in the hard disk like the VB application? Why is it so that I can't install it in c:\MyAppFolderName. And the application exe has to be kept along with the other files found in the release folder. If I take this release folder and install it as c:\MyAppfolderName\Release and then run the from c:\MyAppfolderName\Release\MyApp.exe, will it work?
Regards,
Originally posted by RaggieSoft
What version of VB are you using? There's an article for .NET 1.1 (VB.NET 2003/VB.NET 7.1). I use VB 2005 (VB 8.0) myself.
If you're using VB.NET 2003, then simply head on over to this article: NSIS Development Center
It gets you going with the biggest hurdle, Installing the .NET Framework. ***This is not the same for .NET Framework 2.0 (VB 2005/VB 8.0) since Microsoft changed the installer for .NET 2.0***
The .DLL files and Manifest files are copied verbatim to your installation folder. There is no Registration requirements for any of these files, but they need to be in the same folder as your EXE.
Do not tell your installer to use C:\MyApp (as is your example), but instead, use the Program Files\MyApp folder.
RaggieSoft
13th September 2007 13:47 UTC
The problem will be with Vista as I found out during numerous testing of my own app when it's not in Program Files.
My email address is michael_ragsdale (at) hotmail dot com. Do you think you could send me your app source files as a ZIP so that I can take a look?