Nishant
Nishant

Reputation: 905

Visual Studio Folder Structure

I am not sure how this works. I am using Visual Studio 2008 and I created a class library (say the name is Test). I also selected the option to create a folder for the solution. Following is the directory structure I get:

Test
 - Test
    - bin
       - Debug
    - obj
       - Debug
    - Properties
       - AassemblyInfo.cs
    - Test.cs
    - Test.csproj
 - Test.sln
 - Test.suo

This is default and I have no problems running my code this way. I see that other solutions (class libraries) previously created in Subversion by others have a different structure. The structure for that is as follows:

Test
 - .svn
 - lib
    - <<Reference 1>>
    - <<Reference 2>>
    - ....
    - <<Reference N>>
 - src
    - bin
       - Debug
    - obj
       - Debug
    - Properties
       - AassemblyInfo.cs
    - Test.cs
    - Test.csproj
 - Test.sln
 - Test.suo

How do I create this structure?

All the references to other projects are maintained in the lib folder and source code is maintained in the src folder. This is not the case happening with me. When I open the solution in Visual Studio, I cannot see any such folder like lib or src. It shows the same way as mine.

Upvotes: 2

Views: 2141

Answers (1)

Antoine Aubry
Antoine Aubry

Reputation: 12459

You will have to create that organization manually. In this case, you would have to

  1. Remove the "Test" project from the solution;
  2. Rename the Test/Test folder to Test/src;
  3. Add the project back to the solution.

Regarding the lib folder, simply create it and place any assembly that is needed by your project. It is good practice to do that because that ensures that your project is self-contained - it does not depend on files from other external folders and it carries the correct version of the dependencies.

Upvotes: 1

Related Questions