Solved

Rename directory source code files are in

Posted on 2011-09-04
3
254 Views
Last Modified: 2013-11-26
I would like to rename sub folder MyTestProject 20011-09-01 on the right to MyTestProject (see image). How can I do this so Visual Studio 2010 still knows where all my project files are?
MyTestProject.gif
0
Comment
Question by:deleyd
3 Comments
 
LVL 22

Accepted Solution

by:
pivar earned 167 total points
ID: 36481163
Hi,

If you just want to rename the solution/project, select the solution/project in solution explorer, then press F2 or change Name in properties window.
If you wan't to rename the physical folder. Close Visual Studio, rename the folder in Explorer.
If you changed the solutionname, just open the solutionfile in the new location.
If you changed the projectname, project will be listed as unavailable in solution explorer. Then you have to edit the File path property in properties window.

/peter
0
 
LVL 41

Assisted Solution

by:graye
graye earned 166 total points
ID: 36481461
The *.sln files and the associated project files (*.vbproj, *.csproj, *.vcproj, etc) are all just text-based XML files.

You can easily poke around them using NotePad (or any text editor) and tweak the directory names to match what you've changed them to
0
 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 167 total points
ID: 36483097
Rename the directory, open the .sln and change the path to the project.

If you have standard projects configurations, you do not need to tweak the *.*proj files, since they contain relative paths to the files in the project.

In future projects, when you create the project, do not check the checkbox "Create Directory for Solution". The .sln will then be in the same directory as the *.*proj and all the paths will be relative, so you will be able to change the directory name at any time.

This the way I work with my training material. I can move it in any classroom or in the field when I give private training, and my sample applications can be installed in any directory.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now