Reputation: 857
In Visual Studio 2012 (Windows 8 x64) I right clicked a project and selected 'Edit Project File'. This resulted in the following Error: Command 'Project.UnloadProject' is not available.
I have opened a ticket on MS connect: https://connect.microsoft.com/VisualStudio/feedback/details/766720/command-project-unloadproject-is-not-available
Any one else see this and/or have a work around?
Upvotes: 0
Views: 1029
Reputation: 71
I was trying to run down this same error today. Here's what i found for anyone else who finds this when searching for the same issue.
"Edit Project File" is a menu option added by the Power Tools for Visual Studio extension. It calls the built-in "Unload Project" command. If you look at your context menu and "Unload Project" is not on it, you get the error you see, since that command is not available to be called.
In my case, i ran into this error when i started trying to update a bunch of single project helper solutions. When you load a solution with a single project, the "Unload Project" command is not available on the project's context menu.
There isn't a workaround - you have to manually check out the project file, edit it with a text editor and check it back in.
Edit: I don't have VS 2012 so can't confirm this for that version, but for VS 2010 you can go to the Solution Navigator (not Solution Explorer), right-click the solution and choose Unload Projects, then right-click the project and you can edit it in VS.
Edit #2: Argh - Solution Navigator is from yet another extension, the Visual Studio Productivity Power Tools. Don't know if it's in the VS 2012 version, but here's the link for VS 2010's version: http://blogs.msdn.com/b/visualstudio/archive/2010/07/20/solution-navigator-blog-post.aspx.
Last edit, i swear: There's an option in Tools, Options, Projects and Solutions, General to "Always show solution" - check that and the project context menu will show Unload Project and the error won't happen.
Upvotes: 1