Link to home
Create AccountLog in
Avatar of Wanting2LearnMan
Wanting2LearnManFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Add project to folder in Visual Studio 2010

I have created an empty c# project in Visual Studio 2010 and have added 3 folders to it via right clicking the solution and selecting Add->New Folder.

Not I want to add a new class library under one of these folders so I have selected the folder I want and I have did File-->Add-->New Project.

When I add the new project it does not appear under the folder I want.  It just sits alongside my empty project.

If I try and drag it it will not drag.

How can I do this?
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

I thnk you are confusing two separate things.
There are folders on the file system AND folders in the solution for organising things in the solution/project view (which are nothing to do with the file system).
When you add a class library project it will not appear inside the folder structure of your web site. The class library is a separate project inside the solution. This is so you can use the class library within multiple solutions.
Then you reference your class library with the USING statement (IMPORTS in VB) at the top of each page.
Avatar of Wanting2LearnMan

ASKER

Hi,

I'm not building a web site just a normal c# application.

See this link:
http://blogs.microsoft.co.il/blogs/bursteg/archive/2007/08/13/Build-AddIns-with-System-AddIn.aspx

I want to simply create the 'Host View' under the 'Host Side' folder.
My comment referred to a 'normal' C# application.  Was it relevant to your problem?
Hi Andy, yes I understand what you mean, but how do I create another project and place in under one of the folders I have created under my original solution?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Ahhh.. apologies,

I added my folders under the c# project using right click->Add->New Folder instead of right clicking the solution and selecting Add->New Solution Folder.

Thanks