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;