468,133 Members | 1,226 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,133 developers. It's quick & easy.

Creating ASP.NET Projects with Visual Studio .NET 2003

I've been creating some toy ASP.NET apps in an effort to understand the
technology. I've something odd with regards to project/solution creation.
If you create a new asp.net application, it appears that the project files
get created in the URL specified Location field on the New Project dialog
box. This makes sense to me. What is confusing is that the solution file
gets created in a folder with the same name as the location folder (the
virtual folder name), but that directory gets created in the directory
specified by the "Visual Studio projects location" field in the vstudio
settings.

Would someone explain to me why this is happening? I assume its desired
functionality, but I am not sure why I would want this disconnect between
the solution and the projects. I suppose this is trying to enforce some
best practices approach.

Also, how is this disconnect handled by SourceSafe version 6.0d? I'm sure
there is a nice article out there that explains all of this, I just couldn't
find it.

Any help would be much appreciated. Thanks!
Nov 19 '05 #1
3 1691
Hi epigram ...
What you are seeing is by-design (as you might guess). The solution
file contains entries that point to the web project that is found at the
specified URL. Now ... why is this done? Because solutions can have more
than one project ... and only web projects need to be at a URL. This
provides one .sln file that is easier to locate (for example, in My
Documents\Visual Studio Projects) and can combine multiple types of project
(web, distribution, dll, more web, etc.) And SourceSafe handles this just
fine -- no problems. For an *exhaustive* discussion of Visual SourceSafe for
Web projects, see the Patterns & Practices guide at
http://msdn.microsoft.com/library/en...ml/Tdlg_rm.asp.
BTW: this changes in Visual Studio 2005. While VS 2005 still supports
URL-based web projects (a la VS .NET 2003), it will also support file-based
web projects ... these would appear in the file system with the solution.

"epigram" wrote:
I've been creating some toy ASP.NET apps in an effort to understand the
technology. I've something odd with regards to project/solution creation.
If you create a new asp.net application, it appears that the project files
get created in the URL specified Location field on the New Project dialog
box. This makes sense to me. What is confusing is that the solution file
gets created in a folder with the same name as the location folder (the
virtual folder name), but that directory gets created in the directory
specified by the "Visual Studio projects location" field in the vstudio
settings.

Would someone explain to me why this is happening? I assume its desired
functionality, but I am not sure why I would want this disconnect between
the solution and the projects. I suppose this is trying to enforce some
best practices approach.

Also, how is this disconnect handled by SourceSafe version 6.0d? I'm sure
there is a nice article out there that explains all of this, I just couldn't
find it.

Any help would be much appreciated. Thanks!

Nov 19 '05 #2
By default, Solution files as well as Project files are stored in My
Document\Visual Studio Projects. However, an ASP.Net application must reside
in a web server's virtual directories. Hence, ASP.Net projects are stored in
web server virtual directories, while other executable application projects,
and solutions, are still stored where they can be easily found. You don't
have to go looking through your Inetpub folder to find ASP.Net projects. You
just open the solution and it finds the projects for you.

As for the "disconnect" issue, well, Solutions are made up of multiple
projects. A Solution can be made up of many projects, Why? Because
well-designed assemblies can be used in multiple solutions. Therefore, it
makes sense to keep the solution file "disconnected" from any particular
project.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"epigram" <no****@spammy.com> wrote in message
news:1108058540.a7e909c6d127b1889ae8c1404d9db50d@b ubbanews...
I've been creating some toy ASP.NET apps in an effort to understand the
technology. I've something odd with regards to project/solution creation.
If you create a new asp.net application, it appears that the project files
get created in the URL specified Location field on the New Project dialog
box. This makes sense to me. What is confusing is that the solution file
gets created in a folder with the same name as the location folder (the
virtual folder name), but that directory gets created in the directory
specified by the "Visual Studio projects location" field in the vstudio
settings.

Would someone explain to me why this is happening? I assume its desired
functionality, but I am not sure why I would want this disconnect between
the solution and the projects. I suppose this is trying to enforce some
best practices approach.

Also, how is this disconnect handled by SourceSafe version 6.0d? I'm sure
there is a nice article out there that explains all of this, I just
couldn't find it.

Any help would be much appreciated. Thanks!

Nov 19 '05 #3
Makes sense. Although, it doesn't appear that I can specifiy (on the fly)
where I'd like my solution to go. How would I handle this scenario:

We have a directory structure root where we like to keep all of our projects
& solutions (in various directories based upon project, product, etc. - as
is typical I believe). Let's call this c:\development. I want my If I
create an asp.net, but ultimately want all the project(s) and solution in
this structure, how would I achieve this? My approach, I suppose, would be
to first create a virtual directory that mapped to the development
subdirectory that I wanted the asp.net project to go. In order for me to
put my solution exactly where I want, I would have to go change the "Visual
Studio projects location" option (before I created the solution) to put the
solution where I wanted it to go. It seems for every asp.net
project/solution I create, I would have to go through this process. That
seems like a real pain. Is there a better way to achieve this or a
different best practices approach to this issue?

Thanks!
"J Sawyer [Microsoft]" <JS**************@discussions.microsoft.com> wrote in
message news:22**********************************@microsof t.com...
Hi epigram ...
What you are seeing is by-design (as you might guess). The solution
file contains entries that point to the web project that is found at the
specified URL. Now ... why is this done? Because solutions can have more
than one project ... and only web projects need to be at a URL. This
provides one .sln file that is easier to locate (for example, in My
Documents\Visual Studio Projects) and can combine multiple types of
project
(web, distribution, dll, more web, etc.) And SourceSafe handles this just
fine -- no problems. For an *exhaustive* discussion of Visual SourceSafe
for
Web projects, see the Patterns & Practices guide at
http://msdn.microsoft.com/library/en...ml/Tdlg_rm.asp.
BTW: this changes in Visual Studio 2005. While VS 2005 still supports
URL-based web projects (a la VS .NET 2003), it will also support
file-based
web projects ... these would appear in the file system with the solution.

"epigram" wrote:
I've been creating some toy ASP.NET apps in an effort to understand the
technology. I've something odd with regards to project/solution
creation.
If you create a new asp.net application, it appears that the project
files
get created in the URL specified Location field on the New Project dialog
box. This makes sense to me. What is confusing is that the solution
file
gets created in a folder with the same name as the location folder (the
virtual folder name), but that directory gets created in the directory
specified by the "Visual Studio projects location" field in the vstudio
settings.

Would someone explain to me why this is happening? I assume its desired
functionality, but I am not sure why I would want this disconnect between
the solution and the projects. I suppose this is trying to enforce some
best practices approach.

Also, how is this disconnect handled by SourceSafe version 6.0d? I'm
sure
there is a nice article out there that explains all of this, I just
couldn't
find it.

Any help would be much appreciated. Thanks!

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Shane O'Keeffe | last post: by
3 posts views Thread by Dave | last post: by
3 posts views Thread by Nathan Sokalski | last post: by
reply views Thread by Manikandan | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.