diff --git a/ILSpy.AddIn/Commands/NuGetReferenceForILSpy.cs b/ILSpy.AddIn/Commands/NuGetReferenceForILSpy.cs index 45b183c4b..bc61779f7 100644 --- a/ILSpy.AddIn/Commands/NuGetReferenceForILSpy.cs +++ b/ILSpy.AddIn/Commands/NuGetReferenceForILSpy.cs @@ -8,6 +8,8 @@ using EnvDTE; using Microsoft.VisualStudio.Shell; +using VSLangProj; + namespace ICSharpCode.ILSpy.AddIn.Commands { /// @@ -33,8 +35,8 @@ namespace ICSharpCode.ILSpy.AddIn.Commands if (itemData is ProjectItem projectItem) { - var properties = Utils.GetProperties(projectItem.Properties, "Type"); - if ((properties[0] as string) == "Package") + var properties = Utils.GetProperties(projectItem.Properties, "Type", "ExtenderCATID"); + if (((properties[0] as string) == "Package") || ((properties[1] as string) == PrjBrowseObjectCATID.prjCATIDCSharpReferenceBrowseObject)) { return new NuGetReferenceForILSpy(projectItem); } diff --git a/ILSpy.AddIn/Commands/OpenReferenceCommand.cs b/ILSpy.AddIn/Commands/OpenReferenceCommand.cs index fd4a9dc82..89ca397d4 100644 --- a/ILSpy.AddIn/Commands/OpenReferenceCommand.cs +++ b/ILSpy.AddIn/Commands/OpenReferenceCommand.cs @@ -13,8 +13,8 @@ namespace ICSharpCode.ILSpy.AddIn.Commands { static OpenReferenceCommand instance; - public OpenReferenceCommand(ILSpyAddInPackage owner) - : base(owner, PkgCmdIDList.cmdidOpenReferenceInILSpy) + public OpenReferenceCommand(ILSpyAddInPackage owner, uint id) + : base(owner, id) { ThreadHelper.ThrowIfNotOnUIThread(); } @@ -98,11 +98,11 @@ namespace ICSharpCode.ILSpy.AddIn.Commands } } - internal static void Register(ILSpyAddInPackage owner) + internal static void Register(ILSpyAddInPackage owner, uint id) { ThreadHelper.ThrowIfNotOnUIThread(); - instance = new OpenReferenceCommand(owner); + instance = new OpenReferenceCommand(owner, id); } } diff --git a/ILSpy.AddIn/ILSpy.AddIn.csproj b/ILSpy.AddIn/ILSpy.AddIn.csproj index dd5da5176..270d8f315 100644 --- a/ILSpy.AddIn/ILSpy.AddIn.csproj +++ b/ILSpy.AddIn/ILSpy.AddIn.csproj @@ -165,6 +165,12 @@ Designer + + Designer + + + Designer + true Always diff --git a/ILSpy.AddIn/ILSpyAddIn.en-US.vsct b/ILSpy.AddIn/ILSpyAddIn.en-US.vsct index a6a3c6947..8258f6c04 100644 --- a/ILSpy.AddIn/ILSpyAddIn.en-US.vsct +++ b/ILSpy.AddIn/ILSpyAddIn.en-US.vsct @@ -56,6 +56,16 @@ Open in ILSpy + + - - - - - diff --git a/ILSpy.AddIn/ILSpyAddIn.vsct b/ILSpy.AddIn/ILSpyAddIn.vsct index 3d992eae7..a4a132b29 100644 --- a/ILSpy.AddIn/ILSpyAddIn.vsct +++ b/ILSpy.AddIn/ILSpyAddIn.vsct @@ -52,6 +52,10 @@ + + + + @@ -75,10 +79,12 @@ + + @@ -89,6 +95,10 @@ + + + + diff --git a/ILSpy.AddIn/ILSpyAddIn.zh-Hans.vsct b/ILSpy.AddIn/ILSpyAddIn.zh-Hans.vsct index d50bfb062..1f654e345 100644 --- a/ILSpy.AddIn/ILSpyAddIn.zh-Hans.vsct +++ b/ILSpy.AddIn/ILSpyAddIn.zh-Hans.vsct @@ -34,7 +34,7 @@ group; your package should define its own command set in order to avoid collisions with command ids defined by other packages. --> - + @@ -57,6 +57,16 @@ + + - + - + diff --git a/ILSpy.AddIn/ILSpyAddInPackage.cs b/ILSpy.AddIn/ILSpyAddInPackage.cs index 195940b68..5f35a7d7a 100644 --- a/ILSpy.AddIn/ILSpyAddInPackage.cs +++ b/ILSpy.AddIn/ILSpyAddInPackage.cs @@ -94,7 +94,8 @@ namespace ICSharpCode.ILSpy.AddIn OpenILSpyCommand.Register(this); OpenProjectOutputCommand.Register(this); - OpenReferenceCommand.Register(this); + OpenReferenceCommand.Register(this, PkgCmdIDList.cmdidOpenReferenceInILSpy); + OpenReferenceCommand.Register(this, PkgCmdIDList.cmdidOpenPackageReferenceInILSpy); OpenCodeItemCommand.Register(this); } #endregion diff --git a/ILSpy.AddIn/PkgCmdID.cs b/ILSpy.AddIn/PkgCmdID.cs index 841381a51..aa678e642 100644 --- a/ILSpy.AddIn/PkgCmdID.cs +++ b/ILSpy.AddIn/PkgCmdID.cs @@ -9,5 +9,6 @@ namespace ICSharpCode.ILSpy.AddIn public const uint cmdidOpenReferenceInILSpy = 0x200; public const uint cmdidOpenProjectOutputInILSpy = 0x300; public const uint cmdidOpenCodeItemInILSpy = 0x0400; + public const uint cmdidOpenPackageReferenceInILSpy = 0x500; }; } \ No newline at end of file