Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setup Project is adding built in .NET Framework .System assemblies to output

I'm using VS Community 2015, with Setup Project extension. I've never seen this problem working with 2010. The problem is that when I add a project to the output, the Detected Dependencies list all dll's I've used in the project, including the built in ones:

enter image description here

After I run the installer, it then proceeds to install a hundred dll files, including files that should be part of .NET Framework, like:

  • System.IO.dll
  • System.Linq.dll

I made sure that:

  • I have all my projects set to .NET 4.5.2
  • inside Setup Project, I have the target .NET framework set to .NET 4.5.2
  • inside Setup Project, I have the Prerequisite set to .NET 4.5.2

What am I doing wrong? How can I get the setup to install only the dll's that are not part of .NET Framework (like Caliburn, or NLog). Thanks.

EDIT 1: As per 'Claudius' question, here's a list of .NET frameworks supposedly installed on my machine. Note that, I'm trying to install on the same machine I'm developing on. My /bin/Release folder doesn't have any of the .NET .System directories and the application runs fine from there. enter image description here

EDIT 2: Found another person with a similar problem. Sadly unsolved: Visual Studio Setup Project: Huge list of dependencies

like image 557
Eternal21 Avatar asked May 25 '16 20:05

Eternal21


2 Answers

This might be a Visual Studio issue related to using project output. If you have, for example, just a handful of files that you want to install to the Application Folder, maybe some to the GAC, then just add those individual files to those locations in the File System on Target Machine view.

It might also be related to the CopyLocal setting, I'd make sure it isn't set for assemblies.

I'd also make sure that you haven't got that setting that causes Visual Studio's "Add Reference" to include assemblies from the GAC instead of the appropriate SDK assemblies.

like image 122
PhilDW Avatar answered Oct 27 '22 01:10

PhilDW


If you select a dll (e.g. System.IO) which you are sure it's already in the .NET framework, you can set the property Exclude in the property window to True.

The dll will not be copied into the setup file.

like image 23
Stef Geysels Avatar answered Oct 26 '22 23:10

Stef Geysels