16 September 2011

How to give your ASP.NET Website a Solution Project

The problem:
  Most of us in our initial days of development with Visual Studio and Asp.NET, faced the problem of having no project solution when creating a File -> New website.

This was a problem when we were unable to open the website next time directly and instead we had to first open visual studio, then search for the location of the website folder and open it that way.
a minor inconvenience but which we had to do it again and again.

A probable Solution:
After you are created your new website project, then do the following: (know where it is located)

Create a blank solution project by opening visual studio :

File ->New -> project -> other project types -> visual studio solutions ->blank solution.

Give it a name preferably the name of your website. (know the location of the solution)

Then go to your windows explorer and go to the location of your website.

Cut the whole website folder and paste it inside the solution project folder you just created.

go to the solution project in visual studio.
then open solution explorer sidebar.
Right click on the project and add -> existing website.
Select the location of your website folder.
The website will be added to that project.


Next time you want to open the website just double click on the solution project and that should do the trick of opening your website directly in visual studio environment.

This should work if you cut paste the whole project folder(alongwith the website folder) and put it anywhere.

Hope this is helpful!

No comments:

Post a Comment