Browse Source

Update to NuGet 2.8.5

Adds support for the new .NET Core target frameworks:

core50 - Target framework that is compatible with the Core CLR.
dnx452 - DNX-based apps using the full 4.5.2 version of the framework
dnx46 - DNX-based apps using the full 4.6 version of the framework
dnxcore50 - DNX-based apps using the Core 5.0 version of the framework
4.x
Matt Ward 10 years ago
parent
commit
39bf891c3e
  1. 71
      src/AddIns/Misc/PackageManagement/Project/Src/Design/FakeSettings.cs
  2. 14
      src/AddIns/Misc/PackageManagement/Project/Src/PackageSourceConverter.cs
  3. 10
      src/AddIns/Misc/PackageManagement/Project/Src/RegisteredPackageSourceSettings.cs
  4. BIN
      src/AddIns/Misc/PackageManagement/RequiredLibraries/Microsoft.Web.XmlTransform.dll
  5. BIN
      src/AddIns/Misc/PackageManagement/RequiredLibraries/NuGet.Console.Types.dll
  6. BIN
      src/AddIns/Misc/PackageManagement/RequiredLibraries/NuGet.Core.dll
  7. BIN
      src/AddIns/Misc/PackageManagement/RequiredLibraries/NuGet.exe

71
src/AddIns/Misc/PackageManagement/Project/Src/Design/FakeSettings.cs

@ -3,24 +3,26 @@ @@ -3,24 +3,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using NuGet;
namespace ICSharpCode.PackageManagement.Design
{
public class FakeSettings : ISettings
{
public List<KeyValuePair<string, string>> PackageSources
= new List<KeyValuePair<string, string>>();
public List<SettingValue> PackageSources
= new List<SettingValue> ();
public List<KeyValuePair<string, string>> DisabledPackageSources
= new List<KeyValuePair<string, string>>();
public List<SettingValue> DisabledPackageSources
= new List<SettingValue> ();
public List<KeyValuePair<string, string>> ActivePackageSourceSettings =
new List<KeyValuePair<string, string>>();
public List<SettingValue> ActivePackageSourceSettings =
new List<SettingValue> ();
public Dictionary<string, IList<SettingValue>> Sections
= new Dictionary<string, IList<SettingValue>> ();
public Dictionary<string, IList<KeyValuePair<string, string>>> Sections
= new Dictionary<string, IList<KeyValuePair<string, string>>>();
public FakeSettings()
{
Sections.Add(RegisteredPackageSourceSettings.PackageSourcesSectionName, PackageSources);
@ -28,29 +30,29 @@ namespace ICSharpCode.PackageManagement.Design @@ -28,29 +30,29 @@ namespace ICSharpCode.PackageManagement.Design
Sections.Add(RegisteredPackageSourceSettings.DisabledPackageSourceSectionName, DisabledPackageSources);
}
public string GetValue(string section, string key)
public string GetValue(string section, string key, bool isPath)
{
if (!Sections.ContainsKey(section))
return null;
IList<KeyValuePair<string, string>> values = Sections[section];
foreach (KeyValuePair<string, string> keyPair in values) {
if (keyPair.Key == key) {
return keyPair.Value;
IList<SettingValue> values = Sections[section];
foreach (SettingValue setting in values) {
if (setting.Key == key) {
return setting.Value;
}
}
return null;
}
public IList<KeyValuePair<string, string>> GetValues(string section)
public IList<SettingValue> GetValues(string section, bool isPath)
{
return Sections[section];
}
public void AddFakePackageSource(PackageSource packageSource)
{
var valuePair = new KeyValuePair<string, string>(packageSource.Name, packageSource.Source);
PackageSources.Add(valuePair);
var setting = new SettingValue (packageSource.Name, packageSource.Source, false);
PackageSources.Add(setting);
}
public Dictionary<string, KeyValuePair<string, string>> SavedSectionValues =
@ -115,8 +117,8 @@ namespace ICSharpCode.PackageManagement.Design @@ -115,8 +117,8 @@ namespace ICSharpCode.PackageManagement.Design
public void SetFakeActivePackageSource(PackageSource packageSource)
{
ActivePackageSourceSettings.Clear();
var valuePair = new KeyValuePair<string, string>(packageSource.Name, packageSource.Source);
ActivePackageSourceSettings.Add(valuePair);
var setting = new SettingValue(packageSource.Name, packageSource.Source, false);
ActivePackageSourceSettings.Add(setting);
}
public void MakeActivePackageSourceSectionNull()
@ -138,20 +140,20 @@ namespace ICSharpCode.PackageManagement.Design @@ -138,20 +140,20 @@ namespace ICSharpCode.PackageManagement.Design
}
}
public IList<KeyValuePair<string, string>> GetNestedValues(string section, string key)
public IList<SettingValue> GetNestedValues(string section, string key)
{
throw new NotImplementedException();
return new List<SettingValue>();
}
public void SetNestedValues(string section, string key, IList<KeyValuePair<string, string>> values)
public virtual void SetNestedValues(string section, string key, IList<KeyValuePair<string, string>> values)
{
throw new NotImplementedException();
}
public void AddDisabledPackageSource(PackageSource packageSource)
{
var valuePair = new KeyValuePair<string, string>(packageSource.Name, packageSource.Source);
DisabledPackageSources.Add(valuePair);
var setting = new SettingValue(packageSource.Name, packageSource.Source, false);
DisabledPackageSources.Add(setting);
}
public IList<KeyValuePair<string, string>> GetValuesPassedToSetValuesForDisabledPackageSourcesSection()
@ -165,10 +167,10 @@ namespace ICSharpCode.PackageManagement.Design @@ -165,10 +167,10 @@ namespace ICSharpCode.PackageManagement.Design
}
}
public void SetPackageRestoreSetting(bool enabled)
public virtual void SetPackageRestoreSetting(bool enabled)
{
var items = new List<KeyValuePair<string, string>>();
items.Add(new KeyValuePair<string, string>("enabled", enabled.ToString()));
var items = new List<SettingValue> ();
items.Add(new SettingValue("enabled", enabled.ToString(), false));
Sections.Add("packageRestore", items);
}
@ -182,20 +184,5 @@ namespace ICSharpCode.PackageManagement.Design @@ -182,20 +184,5 @@ namespace ICSharpCode.PackageManagement.Design
return SectionsDeleted.Contains("packageRestore");
}
}
public string GetValue(string section, string key, bool isPath)
{
throw new NotImplementedException();
}
public IList<KeyValuePair<string, string>> GetValues(string section, bool isPath)
{
throw new NotImplementedException();
}
public IList<SettingValue> GetSettingValues(string section, bool isPath)
{
throw new NotImplementedException();
}
}
}

14
src/AddIns/Misc/PackageManagement/Project/Src/PackageSourceConverter.cs

@ -10,16 +10,16 @@ namespace ICSharpCode.PackageManagement @@ -10,16 +10,16 @@ namespace ICSharpCode.PackageManagement
{
public static class PackageSourceConverter
{
public static IEnumerable<PackageSource> ConvertFromKeyValuePairs(IEnumerable<KeyValuePair<string, string>> packageSources)
public static IEnumerable<PackageSource> ConvertFromSettings(IEnumerable<SettingValue> packageSources)
{
if (HasAny(packageSources)) {
foreach (KeyValuePair<string, string> packageSource in packageSources) {
yield return CreatePackageSourceFromKeyValuePair(packageSource);
foreach (SettingValue packageSource in packageSources) {
yield return CreatePackageSourceFromSetting(packageSource);
}
}
}
static bool HasAny(IEnumerable<KeyValuePair<string, string>> packageSources)
static bool HasAny(IEnumerable<SettingValue> packageSources)
{
if (packageSources != null) {
return packageSources.Any();
@ -27,17 +27,17 @@ namespace ICSharpCode.PackageManagement @@ -27,17 +27,17 @@ namespace ICSharpCode.PackageManagement
return false;
}
static PackageSource CreatePackageSourceFromKeyValuePair(KeyValuePair<string, string> savedPackageSource)
static PackageSource CreatePackageSourceFromSetting(SettingValue savedPackageSource)
{
string source = savedPackageSource.Value;
string name = savedPackageSource.Key;
return new PackageSource(source, name);
}
public static PackageSource ConvertFromFirstKeyValuePair(IEnumerable<KeyValuePair<string, string>> packageSources)
public static PackageSource ConvertFromFirstSetting(IEnumerable<SettingValue> packageSources)
{
if (HasAny(packageSources)) {
return CreatePackageSourceFromKeyValuePair(packageSources.First());
return CreatePackageSourceFromSetting(packageSources.First());
}
return null;
}

10
src/AddIns/Misc/PackageManagement/Project/Src/RegisteredPackageSourceSettings.cs

@ -38,8 +38,8 @@ namespace ICSharpCode.PackageManagement @@ -38,8 +38,8 @@ namespace ICSharpCode.PackageManagement
void ReadActivePackageSource()
{
IList<KeyValuePair<string, string>> packageSources = settings.GetValues(ActivePackageSourceSectionName);
activePackageSource = PackageSourceConverter.ConvertFromFirstKeyValuePair(packageSources);
IList<SettingValue> packageSources = settings.GetValues(ActivePackageSourceSectionName, false);
activePackageSource = PackageSourceConverter.ConvertFromFirstSetting(packageSources);
}
public RegisteredPackageSources PackageSources {
@ -64,8 +64,8 @@ namespace ICSharpCode.PackageManagement @@ -64,8 +64,8 @@ namespace ICSharpCode.PackageManagement
IEnumerable<PackageSource> GetPackageSourcesFromSettings()
{
IList<KeyValuePair<string, string>> savedPackageSources = settings.GetValues(PackageSourcesSectionName);
foreach (PackageSource packageSource in PackageSourceConverter.ConvertFromKeyValuePairs(savedPackageSources)) {
IList<SettingValue> savedPackageSources = settings.GetValues(PackageSourcesSectionName, false);
foreach (PackageSource packageSource in PackageSourceConverter.ConvertFromSettings(savedPackageSources)) {
packageSource.IsEnabled = IsPackageSourceEnabled(packageSource);
yield return packageSource;
}
@ -73,7 +73,7 @@ namespace ICSharpCode.PackageManagement @@ -73,7 +73,7 @@ namespace ICSharpCode.PackageManagement
bool IsPackageSourceEnabled(PackageSource packageSource)
{
string disabled = settings.GetValue(DisabledPackageSourceSectionName, packageSource.Name);
string disabled = settings.GetValue(DisabledPackageSourceSectionName, packageSource.Name, false);
return String.IsNullOrEmpty(disabled);
}

BIN
src/AddIns/Misc/PackageManagement/RequiredLibraries/Microsoft.Web.XmlTransform.dll

Binary file not shown.

BIN
src/AddIns/Misc/PackageManagement/RequiredLibraries/NuGet.Console.Types.dll

Binary file not shown.

BIN
src/AddIns/Misc/PackageManagement/RequiredLibraries/NuGet.Core.dll

Binary file not shown.

BIN
src/AddIns/Misc/PackageManagement/RequiredLibraries/NuGet.exe

Binary file not shown.
Loading…
Cancel
Save