0

Recently I started programming in VS2012 C#, a Windows Forms Application and it is almost finished.

I wanted to make a functional and good looking setup wizard So I searched the internet and stackoverflow and soon it became clear that NSIS is a program that has enough functionality to do the job for me.

In VS2012 I have 3 options: Debug, Release and Publish

  • Debug - works fine on my computer and my program works but if I want to deploy on other machines I thing I need to reference some *.dll files, icons, help files, etc. which I need to distribute in the setup file (I think).

  • Release - I think it's almost the same only a different folder.

  • Publish - Makes the following files for me:

    /publish/setup.exe
    /publish/PCWS-Report.application
    
    /publish/Application Files/PCWS-Report_1_0_0_0/FastReport.dll.deploy
    /publish/Application Files/PCWS-Report_1_0_0_0/FastReport.Bars.dll.deploy
    /publish/Application Files/PCWS-Report_1_0_0_0/ODBCMngr.dll.deploy
    /publish/Application Files/PCWS-Report_1_0_0_0/Image1.jpg.deploy
    /publish/Application Files/PCWS-Report_1_0_0_0/PCWS-Report.application.deploy
    /publish/Application Files/PCWS-Report_1_0_0_0/PCWS-Report.exe.manifest
    /publish/Application Files/PCWS-Report_1_0_0_0/PCWS-Report.exe.deploy
    /publish/Application Files/PCWS-Report_1_0_0_0/PCWS-Report.application
    /publish/Application Files/PCWS-Report_1_0_0_0/PCWS-Report.exe.config.deploy
    
    /publish/Application Files/PCWS-Report_1_0_0_0/Resources/
                                   Firebird_ODBC_2.0.1.152_x64.exe.deploy
    

Finally my questions:

  1. From which directory I take the files to build my Setup Files with?

  2. And if it is the Publish directory, do I need to rename the files?

  3. And do I need all the files, like the .manifest.deploy file or the .config.deploy etc.

luviktor
  • 2,240
  • 2
  • 22
  • 23
PCvanWijk
  • 13
  • 1
  • 3

1 Answers1

1

In previous releases of Visual Studio (e.g. 2010), you had two built-in options to create an installer of your project

  • First one is to create Setup or Deployment projects. For Windows Forms Applications this tipically means to build an MSI installer. This is no more an option in VS2012

  • Second one is called Click Once deployment. It is still supported in VS2012. Note, that when you select Publish option in Build menu in Visual Studio you will produce Click Once deployment files (i.e. .deploy).

NSIS is a totally different choice because it isn't a Microsoft technology but it is developed by Nullsoft (yes, their product is Winamp too). It is a scriptable install system, and is a very good one IMHO.

If you would like to create an NSIS installer you doesn't even need Visual Studio. (Of course you have to build your solution first before you create the installer.) You create an .NSI file manually with your favourite text editor (which can be Notepad++ or even VS itself), and build it with makensis.exe which is part of an NSIS installation.

So to your first question: you always use the files in the Release build folder in production. You should read more about the differences between Debug and Release builds. (E.g. here) In short: you use the Debug build while you develop your application and you use your Release build when you want to deploy your app to the production environment.

luviktor
  • 2,240
  • 2
  • 22
  • 23