From 814fc471d9cb7db2154897d570b1f15201e1f8b6 Mon Sep 17 00:00:00 2001 From: Schabse Laks Date: Tue, 11 Nov 2014 20:06:02 -0500 Subject: [PATCH 1/6] Addin: Change project file to open in every VS version Still requires the appropriate SDK to be installed. Thanks @sharwell for much simpler implementation --- ILSpy.AddIn/ILSpy.AddIn.csproj | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ILSpy.AddIn/ILSpy.AddIn.csproj b/ILSpy.AddIn/ILSpy.AddIn.csproj index 03fba192d..625f7b6c7 100644 --- a/ILSpy.AddIn/ILSpy.AddIn.csproj +++ b/ILSpy.AddIn/ILSpy.AddIn.csproj @@ -1,9 +1,13 @@  - 12.0 - 12.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\VSSDK\Microsoft.VsSDK.targets + $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets + + + + $(VisualStudioVersion) @@ -20,6 +24,12 @@ Key.snk v4.5 + + + Program + $(DevEnvDir)\devenv.exe + /rootSuffix Exp + true full @@ -187,7 +197,7 @@ true - + + http://ilspy.net + 1033 + + + + Pro + + + Pro + + + Pro + + + Pro + + + + + |%CurrentProject%;PkgdefProjectOutputGroup| + + From 6fc2f753ecddfaf71fac6ec251536a0d4fcabe14 Mon Sep 17 00:00:00 2001 From: Schabse Laks Date: Tue, 11 Nov 2014 20:46:12 -0500 Subject: [PATCH 4/6] Addin: Fix runtime error in VS2010 explorer.SelectedItems returns object[] --- ILSpy.AddIn/ILSpyAddInPackage.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ILSpy.AddIn/ILSpyAddInPackage.cs b/ILSpy.AddIn/ILSpyAddInPackage.cs index da93514b4..075b4fda6 100644 --- a/ILSpy.AddIn/ILSpyAddInPackage.cs +++ b/ILSpy.AddIn/ILSpyAddInPackage.cs @@ -86,9 +86,9 @@ namespace ICSharpCode.ILSpy.AddIn private void OpenInILSpyCallback(object sender, EventArgs e) { var explorer = ((EnvDTE80.DTE2)GetGlobalService(typeof(EnvDTE.DTE))).ToolWindows.SolutionExplorer; - var items = explorer.SelectedItems as EnvDTE.UIHierarchyItem[]; + var items =(object[]) explorer.SelectedItems ; - foreach (var item in items) { + foreach (EnvDTE.UIHierarchyItem item in items) { dynamic obj = item.Object; OpenAssemblyInILSpy(obj.Path); } From c241f80aa198e01f08cee37be115a65216062ee4 Mon Sep 17 00:00:00 2001 From: Schabse Laks Date: Tue, 11 Nov 2014 20:53:40 -0500 Subject: [PATCH 5/6] Addin: Include all dependent assemblies in VSIX Otherwise, ILSpy will fail to start if it isn't already running. This bloats the VSIX to nearly 6MB, but there is no alternative. --- ILSpy.AddIn/ILSpy.AddIn.csproj | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/ILSpy.AddIn/ILSpy.AddIn.csproj b/ILSpy.AddIn/ILSpy.AddIn.csproj index 9de069796..98a3a6144 100644 --- a/ILSpy.AddIn/ILSpy.AddIn.csproj +++ b/ILSpy.AddIn/ILSpy.AddIn.csproj @@ -189,10 +189,46 @@ + + {6c55b776-26d4-4db3-a6ab-87e783b2f3d1} + ICSharpCode.AvalonEdit + + + {984cc812-9470-4a13-aff9-cc44068d666c} + ICSharpCode.Decompiler + + + {a6bad2ba-76ba-461c-8b6d-418607591247} + ILSpy.BamlDecompiler + {1e85eff9-e370-4683-83e4-8a3d063ff791} ILSpy + + {d68133bd-1e63-496e-9ede-4fbdbf77b486} + Mono.Cecil + + + {63e6915c-7ea4-4d76-ab28-0d7191eea626} + Mono.Cecil.Pdb + + + {53dca265-3c3c-42f9-b647-f72ba678122b} + ICSharpCode.NRefactory.CSharp + + + {7b82b671-419f-45f4-b778-d9286f996efa} + ICSharpCode.NRefactory.VB + + + {3b2a5653-ec97-4001-bb9b-d90f1af2c371} + ICSharpCode.NRefactory + + + {dde2a481-8271-4eac-a330-8fa6a38d13d1} + ICSharpCode.TreeView + true From 8094814cd3d733e1d331b56527f3a5d51634f6ae Mon Sep 17 00:00:00 2001 From: Schabse Laks Date: Wed, 12 Nov 2014 08:01:54 -0500 Subject: [PATCH 6/6] Addin: Retarget to .Net 4.0 The addin will now work on VS2010 without installing .Net 4.5. --- ILSpy.AddIn/ILSpy.AddIn.csproj | 3 ++- ILSpy.AddIn/Resources.Designer.cs | 2 +- ILSpy.AddIn/source.extension.vsixmanifest | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ILSpy.AddIn/ILSpy.AddIn.csproj b/ILSpy.AddIn/ILSpy.AddIn.csproj index 98a3a6144..7c56424cb 100644 --- a/ILSpy.AddIn/ILSpy.AddIn.csproj +++ b/ILSpy.AddIn/ILSpy.AddIn.csproj @@ -4,6 +4,7 @@ $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\VSSDK\Microsoft.VsSDK.targets $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets + @@ -22,7 +23,7 @@ ILSpy.AddIn True Key.snk - v4.5 + v4.0 diff --git a/ILSpy.AddIn/Resources.Designer.cs b/ILSpy.AddIn/Resources.Designer.cs index 98a1a383d..646632f04 100644 --- a/ILSpy.AddIn/Resources.Designer.cs +++ b/ILSpy.AddIn/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 +// Runtime Version:4.0.30319.35317 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/ILSpy.AddIn/source.extension.vsixmanifest b/ILSpy.AddIn/source.extension.vsixmanifest index 5a86e024e..09611f97d 100644 --- a/ILSpy.AddIn/source.extension.vsixmanifest +++ b/ILSpy.AddIn/source.extension.vsixmanifest @@ -10,7 +10,7 @@ http://ilspy.net 1033 - + Pro