Edit project files from VS

Here is a cool trick I learnt recently. Most of the time if I need to edit the project files (csproj or vbproj)  manually I open them in notepad or any other text editor.

But what if one needs to edit a project file, while it is loaded in visual studio.

For standard .csproj and .vbproj files do the following:

  • Open the project in Visual Studio 2005
  • Right-click on the project in Solution Explorer and select Unload Project
  • Right-click on the project in Solution Explorer and select Edit <project file>
  • Once you are done editing Save and close the project file
  • Right-click on the project in Solution Explorer and select Reload Project

The benefit of this way is that you don’t need to close the solution and exit visual studio. As well since you are editing it from Visual Studio you get the syntax highlighting and nicely aligned xml file.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: