Eternal21
Eternal21

Reputation: 4674

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:

I made sure that:

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

Upvotes: 7

Views: 2408

Answers (2)

Stef Geysels
Stef Geysels

Reputation: 1047

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.

Upvotes: 3

PhilDW
PhilDW

Reputation: 20780

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.

Upvotes: 2

Related Questions