Editing a project file as XML

I sometimes need to edit a *.csproj file as XML. However, there isn’t an option for doing so in Visual Studio. Or so I thought.

I often end up opening the *.csproj as a text file from explorer, but then of course, I lose all the Intellisense goodness.

Perhaps I’m slow but it wasn’t until today that found out how to do it in Visual Studio:

  1. Simply right-click the project and choose "Unload Project".
  2. Right-click the "unavailable project" and choose "Edit {project filename}"

image

Once you’ve done that you get the joys of syntax highlighting and Intellisense.

image

Leave a Reply