How to make separate projects for existing .cs files

Posted on 2011-10-11
Last Modified: 2013-11-26
I have a solution with one project in it.  That project has about 40 .cs files.  I want to take those 40 files and group them as to function, then make each group a separate project which I will then build into a .dll file.  I want to do this for ease of maintenance - when one of the projects code changes, I just have to rebuild it and upload just the .dll to replace the previous one in the installer program, thus making an update cleaner and smaller to download.

I believe this will work, but looking to the experts for advice.
Question by:rmmarsh
    LVL 40

    Accepted Solution

    I would not split it. Having 40 .cs files into a project is quite normal, many would even say that it is a small project. Look at all the classes that are in System.Data.dll, and you will see. Microsoft should know a bit about design.

    Not only is it acceptable, but you will also probably help yourself.

    It is quite possible that some pieces of that code need pieces that would end up in another dll. The thing could become quite complex to manage as far as references and versioning are concerned.

    Since you would have to redistribute a new dll each time you make a change, distributing one dll with 40 classes is not simpler than distributing one dll with 10 classes. I would also suspect that if you ever ended up with many changes at the same time, you might have to redistribute many of your little dll at the same time. Once again, distribution only one bigger dll is easier than distributig 2 smaller ones.

    I would simply leave everything as it is.

    If you do it only to help maintenance, maybe you might want to have many folders inside of your project to group the code files. You can add a Folder by right clicking on the project in the Solution Explorer. Once the folder created, you can simply drag and drop a code file into that folder to move it.

    Author Closing Comment

    Thank you...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now