I recently upgraded to Visual Studio 2015. There are many things that I like about it, but one thing that I don't like is that when you hit F2 to rename a file in the solution explorer it now highlights the full name with the extension. Is there anywhere any settings to make it so that it only highlights the name like it did in 2013?
-
I have the same problem on a fresh Windows 7 VM (VirtualBox) with VS 2015 Enterprise. First everything is fine, but once I either open a XAML file or start renaming one (even if the rename is cancelled), all rename operations from then on highlight the extension.– cremorSep 3, 2015 at 6:47
4 Answers
I had the same issue with one specific solution and Visual Studio 2013. It seems problem can be solved by simply deleting .suo
file (you can find it in the same directory as .sln
file).
Note that .suo
file stores your user-specific settings for the solution, so after deleting it you'll lose previously opened tabs, selection for startup project and some other stuff, but nothing really important. Visual Studio will recreate this file next time you open the solution.
Update:
In case of Visual Studio 2015/2017 you have to delete the folder .vs
instead.
We have an active bug right now that we're looking to fix. I've shared these details with the dev who is looking into fixing this so we're not sure right now why this is working for some and not for others. Stay tuned...
Thanks! Cathy VS IDE Team
-
Thanks for the information! Is there a GitHub or MS Connect issue that we can follow?– cremorSep 7, 2015 at 14:59
-
Unfortunately, it's an internal bug only since I logged it myself. I hope we'll get this fixed in an upcoming Visual Studio update, so stay tuned. Thanks! Sep 8, 2015 at 17:20
-
Yeah, so much for "an active bug right now" and "fixing it in an upcoming Visual Studio update" when seven years later the bug is still there, and in all likelihood will stay there, along with thousands of other bugs that nobody at microsoft knows how to fix anymore, until this monstrosity of an IDE is discontinued. Oct 14, 2022 at 10:11
I have Visual Studio 2015 Community Edition and F2 just highlights the file name without extension. This is not an answer to your question, but thought it would help you recognize that not all Visual Studio 2015 installs/upgrades have that issue - and this was too long for a comment. Mine was a fresh install. Have you tried disabling extensions, restarting VS and trying rename again?
-
Interesting. And actually I just realized that I only have that problem in the specific solution that I have been working on. When I created a new one it doesn't highlight the extension. Also when I opened that same solution in 2013 it also doesn't highlight that extension. I am really baffled now. Aug 14, 2015 at 2:59
-
Try opening that specific solution's Project file (e.g. csproj file instead of sln file) with Visual Studio 2015 and see if you can rename the filename without extension. If you can rename the filename without extension, save it in a new solution file and re-open that solution. If all is OK, chances are the solution files may have had an issue– zedfoxusAug 14, 2015 at 3:06
-
I was able to duplicate the problem with a new Solution too. I have even had it where it starts highlighting it correctly when I open the solution, but then as soon as I hit f2 on a .xaml file it highlights the whole file name. And then from there it highlights wrong on even the .cs files that were previously working. Aug 14, 2015 at 3:33
-
How about creating a brand new solution and adding files from the file system (Add Existing File)? Does the issue still occurs? I am intrigued, and am sure you are too.– zedfoxusAug 14, 2015 at 3:46
-
Well if I add existing files right after creating a new solution/project it works. But again as soon as I rename a .xaml file it starts highlighting the extensions of even the new files too. If I add a new file after it has already started doing this it still does it to the added files. Are you able to duplicate now that I gave more details on how I run into the issue? Aug 14, 2015 at 4:36