Search code examples
c#visual-studiovisual-studio-2010project-organization

Visual Studio 2010 project creation best practices


I want to create a new project in C# using VS2010 and I wonder what's the best organization in this project. I have some experience with Maven and what I want here it's something that will be as organized as the Maven folder scheme. THe project it's an API client so my goals are:

  1. Create a deployable module with the API access code;
  2. Create another module with a Main in order to see the client working;
  3. Create another module with automatic testing to test the client.
  4. If the option before requires several projects/solutions, I want to be able to click in one file and VS already have all of the projects opened.

What's the best approach in VS without using any thrid-party tool? I want to automatically deploy the client assembly without having the unit and main code and have the unit code also separated from the rest.


Solution

  • I could be misunderstanding your question - I don't have a lot of experience with API clients, but I'm wondering if what you're really after is a better understanding of solutions. A VS solution allows you to logically group multiple projects, giving you what you're looking for in option 4.

    With that in mind, I'd have a single solution, and then a project for your requirements 1-3.

    Sorry if that's way off base or over simplified.