Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
C#
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using System.Threading;
using System.Windows.Threading;


Will this make the assembly size bigger?

Assuming I'm not using any of the objects from the above namespaces,
Still this has some overhead in my assembly?

Should I ensure I remove all unused namespaces and references in dotnet?
Posted

1 solution

well, yeah the more assemblies you add/reference the larger the overall assembly grows because they are dlls which are of certain size. Most of the framework dlls would be used from the GAC anyway so they won't be added to your debug folder, only the ones that are either third party or your own would be included in the application (i.e. debug or release) folder.

You can remove the ones that are not being used and that should bring the overall size down but the application would still need some core dlls to work properly like System, System.Windows etc. Hope this helps a bit.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900