diff --git a/SharpDevelop.sln b/SharpDevelop.sln
index 71430b65a8..976826c80b 100644
--- a/SharpDevelop.sln
+++ b/SharpDevelop.sln
@@ -105,6 +105,8 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "SharpDevelop.EnvDTE", "src\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PackageManagement.Cmdlets", "src\AddIns\Misc\PackageManagement\Cmdlets\Project\PackageManagement.Cmdlets.csproj", "{E0A5E80A-003B-4335-A9DC-A76E2E46D38D}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager2", "src\AddIns\Misc\AddInManager2\Project\AddInManager2.csproj", "{60480C2F-F228-4D86-B98F-AF75A7DCEC34}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonEdit.AddIn", "src\AddIns\DisplayBindings\AvalonEdit.AddIn\AvalonEdit.AddIn.csproj", "{0162E499-42D0-409B-AA25-EED21F75336B}"
@@ -701,6 +703,14 @@ Global
{0CD86A0B-73BB-4E7E-B476-AB84389164B1}.Release|Any CPU.Build.0 = Release|Any CPU
{0CD86A0B-73BB-4E7E-B476-AB84389164B1}.Release|x86.ActiveCfg = Release|x86
{0CD86A0B-73BB-4E7E-B476-AB84389164B1}.Release|x86.Build.0 = Release|x86
+ {60480C2F-F228-4D86-B98F-AF75A7DCEC34}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {60480C2F-F228-4D86-B98F-AF75A7DCEC34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {60480C2F-F228-4D86-B98F-AF75A7DCEC34}.Debug|x86.Build.0 = Debug|Any CPU
+ {60480C2F-F228-4D86-B98F-AF75A7DCEC34}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {60480C2F-F228-4D86-B98F-AF75A7DCEC34}.Release|Any CPU.Build.0 = Release|Any CPU
+ {60480C2F-F228-4D86-B98F-AF75A7DCEC34}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {60480C2F-F228-4D86-B98F-AF75A7DCEC34}.Release|x86.Build.0 = Release|Any CPU
+ {60480C2F-F228-4D86-B98F-AF75A7DCEC34}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -754,6 +764,9 @@ Global
{752BD058-5517-48A1-BB27-5ED186FA052B} = {87D549AF-8FCD-4E84-9C33-3DB6E42FEF6D}
{E0A5E80A-003B-4335-A9DC-A76E2E46D38D} = {87D549AF-8FCD-4E84-9C33-3DB6E42FEF6D}
{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D}
+ {60480C2F-F228-4D86-B98F-AF75A7DCEC34} = {F3662720-9EA2-4591-BBC6-97361DCE50A9}
+ {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0} = {59A30AA6-D600-41AB-B7A1-9543469DBE36}
+ {0008FCE9-9EB4-4E2E-979B-553278E5BBA6} = {59A30AA6-D600-41AB-B7A1-9543469DBE36}
{0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
{DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}
diff --git a/src/AddIns/Misc/AddInManager2/Project/AddInManager2.addin b/src/AddIns/Misc/AddInManager2/Project/AddInManager2.addin
new file mode 100644
index 0000000000..8182d49efa
--- /dev/null
+++ b/src/AddIns/Misc/AddInManager2/Project/AddInManager2.addin
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/AddIns/Misc/AddInManager2/Project/AddInManager2.csproj b/src/AddIns/Misc/AddInManager2/Project/AddInManager2.csproj
new file mode 100644
index 0000000000..a4153aa8e5
--- /dev/null
+++ b/src/AddIns/Misc/AddInManager2/Project/AddInManager2.csproj
@@ -0,0 +1,189 @@
+
+
+
+ {60480C2F-F228-4D86-B98F-AF75A7DCEC34}
+ Debug
+ AnyCPU
+ Library
+ ICSharpCode.AddInManager2
+ ICSharpCode.AddInManager2
+ v4.5
+ False
+ False
+ OnBuildSuccess
+ False
+ False
+ 4
+ false
+ False
+ Auto
+ 4194304
+ AnyCPU
+ 4096
+ False
+ C:\Users\WheizWork\AppData\Roaming\ICSharpCode/SharpDevelop4\Settings.SourceAnalysis
+
+
+
+ ..\..\..\..\..\AddIns\Misc\AddInManager2\
+ true
+ Full
+ False
+ True
+ DEBUG;TRACE
+ Project
+
+
+ ..\..\..\..\..\AddIns\Misc\OnlineUpdate\
+ false
+ None
+ True
+ False
+ TRACE
+ Project
+
+
+
+ ..\RequiredLibraries\ICSharpCode.SharpZipLib.dll
+
+
+ ..\..\PackageManagement\RequiredLibraries\NuGet.Core.dll
+ True
+
+
+
+
+
+ 3.5
+
+
+
+ 3.5
+
+
+
+
+
+
+ 3.5
+
+
+
+
+
+ Always
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Configuration\GlobalAssemblyInfo.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AddInManagerView.xaml
+
+
+ AddInsView.xaml
+
+
+ Code
+ LicenseAcceptanceView.xaml
+
+
+ PagedResultsView.xaml
+
+
+ PackageRepositoriesView.xaml
+ Code
+
+
+
+
+ {2748AD25-9C63-4E12-877B-4DCE96FBED54}
+ ICSharpCode.SharpDevelop
+ False
+
+
+ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}
+ ICSharpCode.Core
+ False
+
+
+ {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}
+ ICSharpCode.Core.Presentation
+ False
+
+
+ {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}
+ ICSharpCode.Core.WinForms
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/AddIns/Misc/AddInManager2/Project/Configuration/AssemblyInfo.cs b/src/AddIns/Misc/AddInManager2/Project/Configuration/AssemblyInfo.cs
new file mode 100644
index 0000000000..0af1cd427d
--- /dev/null
+++ b/src/AddIns/Misc/AddInManager2/Project/Configuration/AssemblyInfo.cs
@@ -0,0 +1,15 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("AddInManager2")]
+[assembly: AssemblyDescription("AddInManager 2nd Generation for ICSharpCode.Core")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
diff --git a/src/AddIns/Misc/AddInManager2/Project/Resources/StringResources.resx b/src/AddIns/Misc/AddInManager2/Project/Resources/StringResources.resx
new file mode 100644
index 0000000000..cb0baca542
--- /dev/null
+++ b/src/AddIns/Misc/AddInManager2/Project/Resources/StringResources.resx
@@ -0,0 +1,248 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Following installed AddIns are dependent from "{0}":
+
+{1}
+
+They will stop working after disabling this AddIn! Are you sure you want to continue?
+
+
+ You cannot uninstall the AddInManager because you need it to re-install AddIns!
+
+
+ The following packages require a click-to-accept license:
+
+
+ Following installed AddIns are dependent from "{0}":
+
+{1}
+
+They will stop working after removing this AddIn! Are you sure you want to continue?
+
+
+ The following package requires a click-to-accept license:
+
+
+ By clicking "I Accept" you agree to the license terms for the packages listed above.
+If you do not agree to the license terms click "I Decline".
+
+
+ By clicking "I Accept" you agree to the license terms for the package listed above.
+If you do not agree to the license terms click "I Decline".
+
+
+ I &Accept
+
+
+ I &Decline
+
+
+ View License Terms
+
+
+ Created by:
+
+
+ Version:
+
+
+ Installed version:
+
+
+ New version:
+
+
+ Last updated:
+
+
+ Downloads:
+
+
+ Rating:
+
+
+ Report abuse
+
+
+ Dependencies:
+
+
+ Show preinstalled AddIns
+
+
+ Show prereleases
+
+
+ Install from archive...
+
+
+ Installed
+
+
+ Updates
+
+
+ Available
+
+
+ More information
+
+
+ AddIns
+
+
+ Repositories
+
+
+ Move Up
+
+
+ Move Down
+
+
+ Remove
+
+
+ Add
+
+
+ Name:
+
+
+ Source:
+
+
+ Default Repository
+
+
+ License Agreements
+
+
+ SharpDevelop AddIns|*.sdaddin|All files|*.*
+
+
+ Package "{0}" needs at least one additional package:
+
+{1}
+
+The application will try to download and install them, as well. Do you want to continue?
+
+
\ No newline at end of file
diff --git a/src/AddIns/Misc/AddInManager2/Project/Resources/accept.png b/src/AddIns/Misc/AddInManager2/Project/Resources/accept.png
new file mode 100644
index 0000000000..a7d7a96be3
Binary files /dev/null and b/src/AddIns/Misc/AddInManager2/Project/Resources/accept.png differ
diff --git a/src/AddIns/Misc/AddInManager2/Project/Resources/exclamation.png b/src/AddIns/Misc/AddInManager2/Project/Resources/exclamation.png
new file mode 100644
index 0000000000..91f855308f
Binary files /dev/null and b/src/AddIns/Misc/AddInManager2/Project/Resources/exclamation.png differ
diff --git a/src/AddIns/Misc/AddInManager2/Project/Resources/license.txt b/src/AddIns/Misc/AddInManager2/Project/Resources/license.txt
new file mode 100644
index 0000000000..8d4862392a
--- /dev/null
+++ b/src/AddIns/Misc/AddInManager2/Project/Resources/license.txt
@@ -0,0 +1,7 @@
+NuGet Package Icon:
+License: Apache 2.0
+http://www.apache.org/licenses/LICENSE-2.0
+
+Fugue Icons:
+License: Creative Commons Attribution 3.0 License
+http://p.yusukekamiyamane.com/
\ No newline at end of file
diff --git a/src/AddIns/Misc/AddInManager2/Project/Resources/magnifier.png b/src/AddIns/Misc/AddInManager2/Project/Resources/magnifier.png
new file mode 100644
index 0000000000..1b289ed04b
Binary files /dev/null and b/src/AddIns/Misc/AddInManager2/Project/Resources/magnifier.png differ
diff --git a/src/AddIns/Misc/AddInManager2/Project/Resources/packageicon.png b/src/AddIns/Misc/AddInManager2/Project/Resources/packageicon.png
new file mode 100644
index 0000000000..ef5435eb03
Binary files /dev/null and b/src/AddIns/Misc/AddInManager2/Project/Resources/packageicon.png differ
diff --git a/src/AddIns/Misc/AddInManager2/Project/Resources/packageicon_small.png b/src/AddIns/Misc/AddInManager2/Project/Resources/packageicon_small.png
new file mode 100644
index 0000000000..517705401d
Binary files /dev/null and b/src/AddIns/Misc/AddInManager2/Project/Resources/packageicon_small.png differ
diff --git a/src/AddIns/Misc/AddInManager2/Project/Resources/resultset_next.png b/src/AddIns/Misc/AddInManager2/Project/Resources/resultset_next.png
new file mode 100644
index 0000000000..1799620988
Binary files /dev/null and b/src/AddIns/Misc/AddInManager2/Project/Resources/resultset_next.png differ
diff --git a/src/AddIns/Misc/AddInManager2/Project/Resources/resultset_previous.png b/src/AddIns/Misc/AddInManager2/Project/Resources/resultset_previous.png
new file mode 100644
index 0000000000..cdf1fb0779
Binary files /dev/null and b/src/AddIns/Misc/AddInManager2/Project/Resources/resultset_previous.png differ
diff --git a/src/AddIns/Misc/AddInManager2/Project/Resources/sd_packageicon.png b/src/AddIns/Misc/AddInManager2/Project/Resources/sd_packageicon.png
new file mode 100644
index 0000000000..28730c30d5
Binary files /dev/null and b/src/AddIns/Misc/AddInManager2/Project/Resources/sd_packageicon.png differ
diff --git a/src/AddIns/Misc/AddInManager2/Project/Src/AddInManager.cs b/src/AddIns/Misc/AddInManager2/Project/Src/AddInManager.cs
new file mode 100644
index 0000000000..2de7c532d5
--- /dev/null
+++ b/src/AddIns/Misc/AddInManager2/Project/Src/AddInManager.cs
@@ -0,0 +1,59 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using ICSharpCode.AddInManager2.Model;
+
+namespace ICSharpCode.AddInManager2
+{
+ ///
+ /// Container for public services of AddInManager AddIn.
+ ///
+ public class AddInManager
+ {
+ private static readonly AddInManagerEvents _events;
+ private static readonly PackageRepositories _repositories;
+ private static readonly AddInSetup _setup;
+ private static readonly NuGetPackageManager _nuGet;
+
+ static AddInManager()
+ {
+ _events = new AddInManagerEvents();
+ _repositories = new PackageRepositories();
+ _nuGet = new NuGetPackageManager(_repositories, _events);
+ _setup = new AddInSetup(_events, _nuGet);
+ }
+
+ public static IAddInManagerEvents Events
+ {
+ get
+ {
+ return _events;
+ }
+ }
+
+ public static IPackageRepositories Repositories
+ {
+ get
+ {
+ return _repositories;
+ }
+ }
+
+ public static IAddInSetup Setup
+ {
+ get
+ {
+ return _setup;
+ }
+ }
+
+ public static INuGetPackageManager NuGet
+ {
+ get
+ {
+ return _nuGet;
+ }
+ }
+ }
+}
diff --git a/src/AddIns/Misc/AddInManager2/Project/Src/AddInManagerTask.cs b/src/AddIns/Misc/AddInManager2/Project/Src/AddInManagerTask.cs
new file mode 100644
index 0000000000..2f692e7775
--- /dev/null
+++ b/src/AddIns/Misc/AddInManager2/Project/Src/AddInManagerTask.cs
@@ -0,0 +1,89 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ICSharpCode.AddInManager2
+{
+ public class AddInManagerTask
+ {
+ public static AddInManagerTask Create(
+ Func function,
+ Action> continueWith)
+ {
+ return new AddInManagerTask(function, continueWith);
+ }
+ }
+
+ public class AddInManagerTask
+ {
+ Task task;
+ Action> continueWith;
+ CancellationTokenSource cancellationTokenSource;
+
+ public AddInManagerTask(
+ Func function,
+ Action> continueWith)
+ {
+ this.continueWith = continueWith;
+ CreateTask(function);
+ }
+
+ private void CreateTask(Func function)
+ {
+ TaskScheduler scheduler = TaskScheduler.FromCurrentSynchronizationContext();
+ cancellationTokenSource = new CancellationTokenSource();
+ task = new Task(function, cancellationTokenSource.Token);
+ task.ContinueWith(result => OnContinueWith(result), scheduler);
+ }
+
+ private void OnContinueWith(Task task)
+ {
+ continueWith(this);
+ }
+
+ public void Start()
+ {
+ task.Start();
+ }
+
+ public TResult Result
+ {
+ get
+ {
+ return task.Result;
+ }
+ }
+
+ public void Cancel()
+ {
+ cancellationTokenSource.Cancel();
+ }
+
+ public bool IsCancelled
+ {
+ get
+ {
+ return task.IsCanceled;
+ }
+ }
+
+ public bool IsFaulted
+ {
+ get
+ {
+ return task.IsFaulted;
+ }
+ }
+
+ public AggregateException Exception
+ {
+ get
+ {
+ return task.Exception;
+ }
+ }
+ }
+}
diff --git a/src/AddIns/Misc/AddInManager2/Project/Src/BooleanToFontWeightConverter.cs b/src/AddIns/Misc/AddInManager2/Project/Src/BooleanToFontWeightConverter.cs
new file mode 100644
index 0000000000..ca3d89a06e
--- /dev/null
+++ b/src/AddIns/Misc/AddInManager2/Project/Src/BooleanToFontWeightConverter.cs
@@ -0,0 +1,48 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Data;
+
+namespace ICSharpCode.AddInManager2
+{
+ [ValueConversion(typeof(Boolean), typeof(FontWeight))]
+ public class BooleanToFontWeightConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is Boolean)
+ {
+ Boolean fontIsBold = (Boolean)value;
+ return ConvertToFontWeight(fontIsBold);
+ }
+ return DependencyProperty.UnsetValue;
+ }
+
+ FontWeight ConvertToFontWeight(Boolean bold)
+ {
+ if (bold)
+ {
+ return FontWeights.Bold;
+ }
+ return FontWeights.Normal;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is FontWeight)
+ {
+ FontWeight fontWeight = (FontWeight)value;
+ return ConvertToBoolean(fontWeight);
+ }
+ return DependencyProperty.UnsetValue;
+ }
+
+ bool ConvertToBoolean(FontWeight fontWeight)
+ {
+ return fontWeight == FontWeights.Bold;
+ }
+ }
+}
diff --git a/src/AddIns/Misc/AddInManager2/Project/Src/Commands.cs b/src/AddIns/Misc/AddInManager2/Project/Src/Commands.cs
new file mode 100644
index 0000000000..7bf44b4967
--- /dev/null
+++ b/src/AddIns/Misc/AddInManager2/Project/Src/Commands.cs
@@ -0,0 +1,44 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Collections.Generic;
+using ICSharpCode.Core;
+using ICSharpCode.SharpDevelop;
+using ICSharpCode.SharpDevelop.Gui;
+using ICSharpCode.AddInManager2.View;
+
+namespace ICSharpCode.AddInManager2
+{
+ public class ShowCommand : SimpleCommand
+ {
+ public override void Execute(object parameter)
+ {
+ // Open AddInManager2 main dialog
+ using (AddInManagerView view = CreateManagerView())
+ {
+ view.ShowDialog();
+ }
+ }
+
+ private AddInManagerView CreateManagerView()
+ {
+ return new AddInManagerView()
+ {
+ Owner = SD.Workbench.MainWindow
+ };
+ }
+ }
+
+ public class AddInManagerInitializationCommand : SimpleCommand
+ {
+ public override void Execute(object parameter)
+ {
+ // Load string resources needed by AddInManager2
+ SD.ResourceService.RegisterStrings("ICSharpCode.AddInManager2.Resources.StringResources", GetType().Assembly);
+
+ // Remove all unreferenced NuGet packages
+ AddInManager.Setup.RemoveUnreferencedNuGetPackages();
+ }
+ }
+}
diff --git a/src/AddIns/Misc/AddInManager2/Project/Src/DelegateCommand.cs b/src/AddIns/Misc/AddInManager2/Project/Src/DelegateCommand.cs
new file mode 100644
index 0000000000..4aac34ed8e
--- /dev/null
+++ b/src/AddIns/Misc/AddInManager2/Project/Src/DelegateCommand.cs
@@ -0,0 +1,51 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using System.Windows.Input;
+
+namespace ICSharpCode.AddInManager2
+{
+ public class DelegateCommand : ICommand
+ {
+ Action