0

I am making an installer using NSIS and my gameplan was to

  • Build the startup project
  • Copy the Files created from the bin/(x86) or bin/x64 folder and embed them in the installer

The problem is that some files do not get included. From what I have seen, these files are exclusively Microsoft dlls. Does anyone have any ideas on how I can include them?

My idea is to parse through the csProj file and loop through every file on the Item-Group -> PublishFile node, check if it is in the bin subfolder, if it is not,embed the file in the installer.

Is there a simpler/better way to do this? If not, is there atleast a class(perhaps a DTE class) that represents the contents of the csProj file so I wouldn't need to parse xml? I have looked around and I couldn't find any.

user111
  • 397
  • 3
  • 13
  • No. I mean MS assemblies like (Microsoft.SqlServer.ConnectionInfo.dll) and (Microsoft.VisualStudio.Shell.Interop.dll) – user111 Jul 15 '15 at 21:26
  • That probably won't do it because you'll only get the actual assemblies which might have their own dependencies. For the sql server stuff I think you should bundle the SMO-installer within your installer to get it right. https://msdn.microsoft.com/en-us/library/ms162189.aspx – Karl-Johan Sjögren Jul 15 '15 at 22:19

1 Answers1

0

From your original post what I can understand is that, you are building some sort of C# application and want to build a installer for the same.

Now why do you need to pack Microsoft Dlls?

Microsoft do provide every redistributable packages to be installed on end-user computer. You need to analyze what are the packages you need when running your application on a computer that doesn't have Visual Studio installed.

I think you only need .Net Framework and SQL redist packages. And these things can be installed silent during installation. And this is the proer approach.

hypheni
  • 756
  • 3
  • 17
  • 37