Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1956
  • Last Modified:

Visual Studio Express 2012: How to rename a Project?

Hi Experts,
I had no problem renaming my Solution, just right-clicked on the solution name and chose the "rename" option from the context menu.

But when I right-click on the Project name, the "rename" option does not appear.

Is it possible to rename a Project in Visual Studio Express 2012?

thanks!
0
rascal
Asked:
rascal
  • 2
  • 2
1 Solution
 
käµfm³d 👽Commented:
Yes, you can rename a project in the manner you describe. Make sure your application is not actually running, though. If you are actively debugging your application, then you cannot make changes to it.
0
 
rascalAuthor Commented:
I closed VS, then re-opened it, made sure the debugger was not running, same result - the rename option does not appear when I right-click on the project name.

Screenshot1 shows the lack of the rename option in the popup menu.
Screenshot2 shows the debugger is not running
screenshot1.jpg
screenshot2.jpg
0
 
käµfm³d 👽Commented:
Ah, you have a website, not a web application. Unfortunately, I don't think there is any way within Visual Studio to rename such (hopefully someone can chime in otherwise). As a workaround, you can manually edit the solution file (.sln)--it's just a text file. To do so:

Make a backup!!
Close VS
Navigate to the folder that has your project
Open the .sln file within a text editor
Replace all occurrences of your website name ("ccr") with the new name
Save and close the file
Open up your solution's directory
Rename the .sln and the .suo file to more appropriate names
Go up one level
Rename the website folder
Go up two levels. You should be in the Visual Studio folder
Go in to the "WebSites" folder
Rename your website's folder
Open up the IIS Express Application Host file. Within your Documents folder (standard Windows folder), there should be a folder named "IISExpress". Within that folder is a folder named "config". Within that folder is a file named "applicationhost.config". It is simply an XML file. Open it up within a text editor, and rename the occurrence of your old website name with the new website name. Also change the path to point to the new path.
Reopen your poject within VS (old name won't work, so don't try to open it from the Start Page listing. You'll need to browse to the new .sln file.
0
 
rascalAuthor Commented:
Thanks kaufmed for the excellent answer.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now