File Location for ASP.NET Projects

Problem
You want to create a Web Forms utility program, and you’re unsure how to organize its files.

Solution
Pass on Visual Studio’s default directory for ASP.NET solutions. Rather, create a blank solution in a directory of your choice. Then, make it a virtual folder.

Comments
Visual Studio places solution files (.sln) in a directory in C:\Users\CurrentUserName\source\repos\ProjectName by default. It also places ASP.NET pages (.aspx) and other source code files in a directory under C:\Inetpub\wwwroot. It’s not wise to have project files scattered in two different locations on disk. A fix is to create a blank solution in Visual Studio in a directory of your choice (for example, the BugReporter solution in the C:\TestUtilities\BugReporter directory). Next, make the solution’s directory a virtual folder. Lastly, add a new Web Forms project in Visual Studio and set its location to the virtual directory. The result: All project files will be created in this folder.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s