Need to create a smaller executable

I have an executable (written in C# using Visual Studio Express 2005) that is 688Mb.  I don't need all of the functions all of the time, so I wanted to take some of the .cs files and create .dlls out of them.

How do I do that? (a pointer to some docs would be nice). :D
rmmarshAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ColemssCommented:
http://www.c-sharpcorner.com/UploadFile/mahesh/dll12222005064058AM/dll.aspx

Then reference the created dlls in your main project.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rmmarshAuthor Commented:
OK... now, will these load ONLY if called?  Also, once in memory, and no longer needed, will they be paged out?
0
ColemssCommented:
There are many ways of managing dlls.  Read up on Garbage collection in .NET.

For the most part they are loaded on use.  Then if you destroy the object using them.  When garabage collections runs it cleans them out of memory.

I have to ask. What in your project makes it 600 MB. Do you store images?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

rmmarshAuthor Commented:
No... just a very, very large book inventory program that does lots of things... great little program, just too big now... if you are interested, go to my website (www.pragersoftware.com)...

Thanks for the help...
0
ColemssCommented:
I only ask because it seems like your storing data in your application.  What you usually want to do is..  Create the data externally, like in dlls, and database files.  It must take for ever to load a 600mb exe.

I can't imagine 600mb of just code.  You must have some type of files stored.  I would look into externalizing as much as possible.  
0
ColemssCommented:
Also found a typo on your web site.  Thought you should know.

Ever wondered how competitive your rices are? How many sales are you losing by not having competitive prices? Prices change every day (almost every hour!), and its a real hassle to go though your inventory one book at a time, checking prices... not sure you have found the lowest or highest... We have the answer in our Repricing Tool.
0
rmmarshAuthor Commented:
Thanks Colemss... I'll fix the web site... and no, there is no data stored... I have about 10,000 lines of C# code, a form with lot's of tabs and am always pruning to make it smaller... but your ideas for .dll's are going to do the trick...

Thanks again for your suggestions and comments...

R
0
ColemssCommented:
Just though you would ilke to know I work on apps that have 100,000+ lines of code and are smaller than a 1 mb.   Im just guessing here but I think your duplicating imagelists or something.  

Happy coding!
0
rmmarshAuthor Commented:
Do you think it could be the windows form?  I have about a dozen tabs, each with lots and lots of text boxes, drop down lists, etc.  That's the only thing I can think of that would cause it.  All of my program options, etc are stored in XML files on the user's machine.  Absolutely no graphics are used anywhere!
0
ColemssCommented:
Dunno. I made a project added 20 tabs made 13 k exe.
Reduced it to 2 tabs and added 40 controls to both tabs made 44k exe.

You must be duplicating something. Probably cutting and pasting between tabs.  I would look at the designer code for controls you are not expecting to see.  Like a ImageList hidden behind another control.

Good luck
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.