Class Library (VS 2005)

Started by
8 comments, last by Zyndrof 17 years, 10 months ago
My book (using VS.net) says this on the subject (for an exercise): "Use Solution Explorer an right click the upper alternative 'Favorites Viewer' (1 project). Choose Add | New project from the menu. This will open the Add New Project dialog. Choose Class Library from the Templates-list and name the project MyFavorites." The problem is that there is no "upper alternative 'Favorites Viewer' (1 project)". When I tried to add a class library in File | New Project, a completley new project was created and my old project was shut down. So, how do you create a Class Library in Visual Studio 2005?
Advertisement
I forget exactly how it looks, but in the solution explorer, right above all your projects is another piece of text you can right click. In that popup menu will be Add -> New Project... Hope that helps.

-AJ
V/R,-AJThere are 10 kinds of people in the world: Those who understand binary and those who don't...
In your solution explorer, right click on the solution name (something like: Solution 'xyz'), so you can add new projects (Add->New Project).

If you right click on a project unter your solution name, you can add new classes or whatever you want (Add->New Item or Add->New Class).

To open your solution browser if it's closed: View->Solution Explorer
Quote:Original post by Ludi83
In your solution explorer, right click on the solution name (something like: Solution 'xyz'), so you can add new projects (Add->New Project).

If you right click on a project unter your solution name, you can add new classes or whatever you want (Add->New Item or Add->New Class).

To open your solution browser if it's closed: View->Solution Explorer


Yes, I've understood that from a screenshot in the book (should have been clearer). The thing not existing is the solution name. The project name is there though and creating classes, modules and stuf is not a problem. Just the solution thing.
If you only have a project (with no solution) and you want to add another project to it, save and close what you have then restart VS .NET. Create a new, blank solution (File->New->Project->Other Visual Studio Projects->Blank Solution). Name it, choose a good path for it etc... and then save it. Once that has loaded up, simply right click the solution icon in the solution browser (if you can't see it, View->Solution Explorer as mentioned above) then 'Add->Existing project'. Choose the project that you just had open and add it. For the new project, right click the solution icon again and 'Add->New project'. Select what you want, save it and now you will have two projects in the same solution.
Quote:Original post by rpg_code_master
If you only have a project (with no solution) and you want to add another project to it, save and close what you have then restart VS .NET. Create a new, blank solution (File->New->Project->Other Visual Studio Projects->Blank Solution). Name it, choose a good path for it etc... and then save it. Once that has loaded up, simply right click the solution icon in the solution browser (if you can't see it, View->Solution Explorer as mentioned above) then 'Add->Existing project'. Choose the project that you just had open and add it. For the new project, right click the solution icon again and 'Add->New project'. Select what you want, save it and now you will have two projects in the same solution.


I created a blank solution and added my project to it, when I did, the Solution text in the top disappeared and the solution looked just like it did before:

It's a stupid VS 2005 thing. It doesn't SHOW the solution in the explorer when you only have 1 project in it (top item is the project). You should still be able to add more projects using the menu though (I think).
Quote:Original post by Xai
It's a stupid VS 2005 thing. It doesn't SHOW the solution in the explorer when you only have 1 project in it (top item is the project). You should still be able to add more projects using the menu though (I think).


Yeahm that's what I tried to do, with the project open I created a new one from the File menu, the old project was then closed down by VS 2005.
don't go to:

File | New | New Project

go to:

File | Add | New Project

then you'll be fine
Quote:Original post by Xai
don't go to:

File | New | New Project

go to:

File | Add | New Project

then you'll be fine


Thank you very much! :)

This topic is closed to new replies.

Advertisement