There is a small gap in the Visual Studio extension, which means that renames are not handled perfectly.
The easiest option is to create a new file with the correct name, move the contents, and delete the old file.
A slightly more complicated option is to manually edit the project file after renaming to update the associations.
Using Web Essentials, you have a similar problem with a renamed file with the wrong JavaScript name and a Map file, and you will have to play with it to make it work. It still seems that the cleanest option is to add a new file and transfer the contents, rather than renaming.
source share