Cannot open resource file-"open in another editor"
The resource view has stopped working, because when I try to open MyProject.rc from RESOURCE VIEW, I get message "Opened in another editor". Previously, everything worked as expected with the same resource file and version of VS11.
The file is not open in any other editor. The problem persists if I close the solution and re-open it, if I stop VS11 and restart it, and if I reboot the system, start VS11 and open the project.
I can open MyProj.rc with Notepad or WordPad. I can also open MyProj.rc by double-clicking on the filename in Windows Explorer, which opens VS11 and then opens the resource file. So I suspect it is something in the project state file.
What I want to know is how can I "reset" whichever file is "remembering" that the resource file is open.
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Reboot Windows 7
Start VS11 beta
Open MySoln (solution which contains MyProj)
In RESOURCE VIEW expand MyProj, then MyProj.rc
Product Language
Operating System
Operating System Language
Actual results
Expected results
The operation of VS could be greatly improved in this regard, by giving a more specific error message (e g, "MyProj.rc cannot be opened because resource.h is open"), offering to close the offending file, and when resource.h is closed, updating the "allowed to open" status for MyProj.rc.
Thanks for the investigation and feedback. Before you figured out what the problem was, I was going to suggest that you delete your .suo file. This file is automatically created in your solution directory and is hidden by default. Among other user-specific solution state information, one of the items it tracks are the files that you last had open for a solution. Therefore, if you delete it, the next time you open that solution, no files will automatically be opened and it would have resolved your issue as well. We are not able to address this for the next version of Visual Studio but we'll consider improving this experience in a future release.
Thanks again,
Jim Griesmer
Visual C++ Team