Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Refactor->Rename doesn't work in C#

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
gbozoki Posted - Jun 19 2012 : 11:25:54 AM
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;
1   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Jun 19 2012 : 7:59:31 PM
I am seeing the same effect here. Thank you for the test code.

case=23734

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000