.netvisual-studioresourcesvisual-studio-designer

Renaming resources in Visual Studio does not update their references


I have added some image files as resources to my project through the Resources.resx. But if I change the name of the image file after adding it, both in Resources.resx and in the "Resources" folder on the Solution Explorer window, Visual Studio does not update their references and instead flairs errors that the "old" resource is missing. I find it very odd and wonder if that is normal?


Solution

  • To rename the resource property name, it's enough to open your .resx file in designer and then simply rename the entry. This way, visual studio renames the property everywhere it has been used.

    To rename the file name, you have 2 options: