when i create new website visual studio 2008 not placing it inside a solution. this prevents me to add more projects such as class library. does any one know why?
Printable View
when i create new website visual studio 2008 not placing it inside a solution. this prevents me to add more projects such as class library. does any one know why?
Hey,
A new Web Site, doesn't use a solution file to manage it. Visual Studio handles this as it's own entity. What you are after is a new Web Application. This will let you add other projects that are related to your Web Application, such as class libraries.
Gary
Hi Gary,
if you remember from my last thread i used Website and not web application and i still was able to create Class Library in it, and even when i started new web application i still couldn't find the option to add class library.
Ah, hold on, my bad. Looks like Visual Studio creates the solution file for you, and puts it into your local Documents and Settings folder. Once you have the web site open, go to Solution Explorer, right click on the solution file, then select Add | New Project. From there you will be able to select a class library project. If you already have a project created somewhere, you can choose to Add an Existing Project.
You can move the solution file from the Documents and Setting folder if you want, to somewhere more sensible, however, you will have to update the references to the various projects.
Gary
Hi gary,
That's exactly what i mean i don't have the solution file created for me all i see is the new website name at the top of the Solution Explorer, that's really weird.
Hey,
What version of Visual Studio do you use again?
Gary
thanks Gary,
i will post the version tomorrow morning when i'm back at work.
Hey,
I did a quick test last night, as I now have Visual Web Developer installed on my machine here, and I suspect that you are using this. When I created a Web Site, within Visual Web Developer, I was not then able to add other projects alongside it. I can only assume that this is a limitation of this version, as I can do this within the full version of Visual Studio.
Gary
It should be available in all versions.
Tools
Options
Projects and Solutions
Always show solution
Hey,
If you are using Visual Web Developer Express, remember to check the "Show All Settings" checkbox in the bottom left hand corner, or you won't see the option that Mendhak has mentioned.
Gary
@Gary, I'm using VS2008 pro but thanks for the tip!
@mendhak, Thank you very much, that was the problem!
Hey,
Ah, ok, no probs.
Remember to mark resolved :)
Gary