Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Refactor->Rename doesn't work in C#
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gbozoki
Ketchup Master

USA
70 Posts

Posted - Jun 19 2012 :  11:25:54 AM  Show Profile  Reply with Quote
Using VS 2008 and C#, Refactor->Rename doesn't work (doesn't come up) with the following code:

using System;
using System.Collections.Generic;
using System.Text;

namespace System.Runtime.CompilerServices
{
    [
        AttributeUsage ( AttributeTargets.Method | AttributeTargets.Class |
            AttributeTargets.Assembly )
    ]
    public sealed class ExtensionAttribute : Attribute
    {
    }
}

namespace ClassLibrary3
{
    public static class Ext
    {
        public static string DoStr ( this string sStr )
        {
            return ( sStr );
        }
    }
    
    public class Class1
    {
        private List<string> m_oStrings = new List<string> ();
        
        public void Something ( int nValue )
        {
            nValue = m_oStrings[m_oStrings.Count - 1].DoStr ().Length;
        }
    }
}


To reproduce, move the caret inside the red DoStr symbol and try to invoke Refactor->Rename. It's not possible because the menu item is disabled (if you have a keyboard shortcut assigned to it, it may open some menu item like it does for me).

My VAX info (email truncated):

VA_X.dll file version 10.7.1906.0 built 2012.05.10
Licensed to:
VA X: ... (1-user license) Support ends 2013.06.18
DevEnv.exe version 9.0.30729.1 Enterprise
msenv.dll version 9.0.30729.1
Font: Courier New 13(Pixels)
Comctl32.dll version 6.10.7601.17514
Windows 7 6.1 Build 7601 Service Pack 1
8 processors (x86-64;
WOW64)
Language info: 1252, 0x409

Platform: Win32
Stable Includes:
C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\include;
C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\include;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;
C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include;

Other Includes:

Stable Source Directories:
C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfc;
C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\mfcm;
C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\atlmfc\\src\\atl;
C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\crt\\src;

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jun 19 2012 :  7:59:31 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the test code.

case=23734
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000