Refactoring Fails

Topics: Developer Forum
Jul 31, 2007 at 12:15 AM
I cannot figure out why this doesn't seem to work for me. I right-click on the string, goto to Refactor -> Extract To Resource and nothing happens (other than the context menu gets hidden). There aren't any errors or anything. Nothing in my project is readonly and the resource file already exists. I have tried reinstalling and restarting both VS 2005 and Win XP. I am using VS 2005 Team Dev with SP1 on Win XP with VB.Net.

Any help would be appreciated. I would really love to use this tool!
Aug 11, 2007 at 3:46 PM
Could you give me more details about the project, such as language, project type and also if you have "Other files" category in your solution.

Aug 17, 2007 at 3:15 PM
We have here the same problem with some VS2005 C# projects. We noticed that projects which contains file resources are affected from the problem.

Steps to reproduce
--> Resources.resx -> Add existing file --> Add a text file

Now the resource refactoring tool doesn't show up anymore.
Aug 21, 2007 at 12:49 PM
I don't really have the time to create a CodePlex patch at the moment but below is a unix style patch to fix this issue. It has to be applied againts CommonVB.ResourceFile.vb. The patched code skips file resources.

Bertan could you create a real patch?


< If resource.GetValueTypeName(New System.Reflection.AssemblyName() {}).Equals(GetType(String).AssemblyQualifiedName) Then
> If resource.GetValueTypeName(New System.Reflection.AssemblyName() {}).Equals(GetType(String).AssemblyQualifiedName) _
> AndAlso resource.FileRef Is Nothing Then
Sep 4, 2007 at 5:56 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.