Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Solution file not in the solution folder

Reply
Thread Tools

Solution file not in the solution folder

 
 
=?Utf-8?B?Y2FzaGRlc2ttYWM=?=
Guest
Posts: n/a
 
      09-12-2006
Why is it that when I create a new web application, the project folder
containing the webform, web.config and csproj files appears in
C:\inetpub\wwwroot, yet my .sln and .suo files appear in another folder in My
Documents\Visual Studio Projects?

Is this normal, or have I somehow made an inadvertant change somewhere?
 
Reply With Quote
 
 
 
 
Damien
Guest
Posts: n/a
 
      09-12-2006
cashdeskmac wrote:
> Why is it that when I create a new web application, the project folder
> containing the webform, web.config and csproj files appears in
> C:\inetpub\wwwroot, yet my .sln and .suo files appear in another folder in My
> Documents\Visual Studio Projects?
>
> Is this normal, or have I somehow made an inadvertant change somewhere?


This is normal behaviour. Solution files are solution files. With all
the extensibility in VS, solution files are designed to not know
anything about the projects they might contain. So when VS comes to
create a solution file, it creates it in the same place it creates any
other solution files (by default).

Now, some of the new project wizards let you dictate separate locations
for the solutions directory and the project directory, but the new
website wizard isn't one of them (at least under 2003, not sure about
2005).

Now, you might think that you could create a folder under
c:\inetpub\wwwroot, create a blank solution under there, and then put
the project in the same folder. But VS will complain that the folder
exists...

You could create the project and then move the solution file, and that
should work fine. However, for larger jobs, you might have several
non-web projects and a web project in the same solution (e.g. if you
have a data layer DLL and a Business layer DLL). If that's the case, VS
will be happiest if you have these other projects in sub folders below
where your solution is located. Which if you've put the solution under
the inetpub\wwwroot directory will considerably clutter that area (plus
if you plan to XCopy deploy your project, not only are your code behind
files sitting in a potentially web accessible location*, but so are
your code files for your DLLs.

*only if an administrator misconfigures IIS, to be sure, but why take
the risk.

Damien

 
Reply With Quote
 
 
 
 
Laurent Bugnion
Guest
Posts: n/a
 
      09-12-2006
Hi,

cashdeskmac wrote:
> Why is it that when I create a new web application, the project folder
> containing the webform, web.config and csproj files appears in
> C:\inetpub\wwwroot, yet my .sln and .suo files appear in another folder in My
> Documents\Visual Studio Projects?
>
> Is this normal, or have I somehow made an inadvertant change somewhere?


When you create a new solution, you can specify where the solution file
must be saved. You can change the defaults under Tools / Options /
Projects and solutions.

I like to have the following structure:

+ Application/Library folder
+ _current
- Solution File
+ Project 1 folder
- Project file
(+ Project 2 folder)
(...)

This allows me to make backups easier. However, in ASP.NET 1.1, you must
manually create a virtual folder in IIS pointing to the corresponding
project folder.

You can also move the solution files around, and then open it again. In
ASP.NET 2.0, if you save the web project to the file system, it will
tell you that it doesn't find it anymore, but it's easy to use the
properties (F4) to set the correct location again.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bundler+metric_fu customs configuration (not rails) - after changingdefault folder, still creating the default folder tmp Pablo Q. Ruby 0 11-05-2010 06:52 PM
Browse to Folder instead of Folder + File Dan ASP .Net 7 10-28-2010 07:39 AM
32bit Program installed to the Program Files folder and not the PFx86 folder murdock69u@gmail.com Windows 64bit 1 04-30-2009 01:30 PM
TRying to import files from my folder not pythons lib folder tedpottel@gmail.com Python 7 09-25-2007 02:36 AM
Set folder date to date of newest file in the folder? jhigbee@nyx.net Computer Support 4 08-16-2005 08:09 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57