Solved

Rename directory source code files are in

Posted on 2011-09-04
3
253 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

920 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

13 Experts available now in Live!

Get 1:1 Help Now