Updated to NuGet 3.5; prepared for NuGet 4.0

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 8 years ago
parent 23807e228b
commit 1cd558e4ba
  1. 93
      DotNetBuilder/MicroBuildServer.DotNetBuilder.csproj
  2. 147
      DotNetBuilder/NuGetter.cs
  3. 23
      DotNetBuilder/app.config
  4. 23
      DotNetBuilder/packages.config

@ -56,12 +56,84 @@
<HintPath>..\packages\Microsoft.Build.Utilities.Core.15.1.548\lib\net46\Microsoft.Build.Utilities.Core.dll</HintPath> <HintPath>..\packages\Microsoft.Build.Utilities.Core.15.1.548\lib\net46\Microsoft.Build.Utilities.Core.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.Extensions.CommandLineUtils, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.CommandLineUtils.1.1.0\lib\net451\Microsoft.Extensions.CommandLineUtils.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="NuGet"> <Reference Include="NuGet">
<HintPath>..\packages\NuGet.CommandLine.2.8.5\tools\NuGet.exe</HintPath> <HintPath>..\packages\NuGet.CommandLine.3.5.0\tools\NuGet.exe</HintPath>
</Reference>
<Reference Include="NuGet.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Client.4.0.0\lib\net45\NuGet.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Commands, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Commands.4.0.0\lib\net45\NuGet.Commands.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Common.4.0.0\lib\net45\NuGet.Common.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Configuration.4.0.0\lib\net45\NuGet.Configuration.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.ContentModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.ContentModel.4.0.0\lib\net45\NuGet.ContentModel.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.DependencyResolver.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.DependencyResolver.Core.4.0.0\lib\net45\NuGet.DependencyResolver.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Frameworks, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Frameworks.4.0.0\lib\net45\NuGet.Frameworks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.LibraryModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.LibraryModel.4.0.0\lib\net45\NuGet.LibraryModel.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Packaging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Packaging.4.0.0\lib\net45\NuGet.Packaging.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Packaging.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Packaging.Core.4.0.0\lib\net45\NuGet.Packaging.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Packaging.Core.Types, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Packaging.Core.Types.4.0.0\lib\net45\NuGet.Packaging.Core.Types.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.ProjectModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.ProjectModel.4.0.0\lib\net45\NuGet.ProjectModel.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Protocol.Core.Types, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Protocol.Core.Types.4.0.0\lib\net45\NuGet.Protocol.Core.Types.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Protocol.Core.v3, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Protocol.Core.v3.4.0.0\lib\net45\NuGet.Protocol.Core.v3.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Repositories, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Repositories.4.0.0\lib\net45\NuGet.Repositories.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.RuntimeModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.RuntimeModel.4.0.0\lib\net45\NuGet.RuntimeModel.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NuGet.Versioning, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\NuGet.Versioning.4.0.0\lib\net45\NuGet.Versioning.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="nunit-console-runner"> <Reference Include="nunit-console-runner">
<HintPath>..\packages\NUnit.Runners.2.6.3\tools\lib\nunit-console-runner.dll</HintPath> <HintPath>..\packages\NUnit.Runners.2.6.3\tools\lib\nunit-console-runner.dll</HintPath>
@ -91,7 +163,26 @@
<HintPath>..\packages\StyleCop.Analyzers.1.0.0\analyzers\dotnet\cs\StyleCop.Analyzers.dll</HintPath> <HintPath>..\packages\StyleCop.Analyzers.1.0.0\analyzers\dotnet\cs\StyleCop.Analyzers.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.IdentityModel" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Runtime.Serialization.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Security" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />

@ -1,8 +1,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Security;
using NuGet; using NuGet;
using NuGet.Commands; using NuGet.CommandLine;
using NuGet.Common; using NuGet.Common;
namespace MicroBuildServer.DotNetBuilder namespace MicroBuildServer.DotNetBuilder
@ -13,11 +14,6 @@ namespace MicroBuildServer.DotNetBuilder
{ {
public readonly Messages Messages = new Messages(); public readonly Messages Messages = new Messages();
public bool Confirm(string description)
{
throw new NotImplementedException();
}
public int CursorLeft public int CursorLeft
{ {
get { throw new NotImplementedException(); } get { throw new NotImplementedException(); }
@ -26,35 +22,10 @@ namespace MicroBuildServer.DotNetBuilder
public bool IsNonInteractive public bool IsNonInteractive
{ {
get { return true; } get { throw new NotImplementedException(); }
set { throw new NotImplementedException(); } set { throw new NotImplementedException(); }
} }
public void PrintJustified(int startIndex, string text, int maxWidth)
{
throw new NotImplementedException();
}
public void PrintJustified(int startIndex, string text)
{
throw new NotImplementedException();
}
public ConsoleKeyInfo ReadKey()
{
throw new NotImplementedException();
}
public string ReadLine()
{
throw new NotImplementedException();
}
public void ReadSecureString(System.Security.SecureString secureString)
{
throw new NotImplementedException();
}
public Verbosity Verbosity public Verbosity Verbosity
{ {
get { return Verbosity.Detailed; } get { return Verbosity.Detailed; }
@ -67,106 +38,88 @@ namespace MicroBuildServer.DotNetBuilder
set { throw new NotImplementedException(); } set { throw new NotImplementedException(); }
} }
public void Write(string format, params object[] args) public bool Confirm(string description)
{ {
Write(string.Format(format, args)); throw new NotImplementedException();
} }
public void Write(string value) public void LogDebug(string data) => this.Messages.Add(Message.CreateInfo(data));
{
Messages.Add(Message.CreateInfo(value));
}
public void Write(object value) public void LogError(string data) => this.Messages.Add(Message.CreateError(data));
{
Write(value.ToString());
}
public void WriteError(string format, params object[] args) public void LogErrorSummary(string data) => this.Messages.Add(Message.CreateError(data));
{
WriteError(string.Format(format, args));
}
public void WriteError(string value) public void LogInformation(string data) => this.Messages.Add(Message.CreateInfo(data));
{
Messages.Add(Message.CreateError(value)); public void LogInformationSummary(string data) => this.Messages.Add(Message.CreateInfo(data));
}
public void LogMinimal(string data) => this.Messages.Add(Message.CreateInfo(data));
public void LogVerbose(string data) => this.Messages.Add(Message.CreateInfo(data));
public void WriteError(object value) public void LogWarning(string data) => this.Messages.Add(Message.CreateWarn(data));
public void PrintJustified(int startIndex, string text)
{ {
WriteError(value.ToString()); throw new NotImplementedException();
} }
public void WriteLine(ConsoleColor color, string value, params object[] args) public void PrintJustified(int startIndex, string text, int maxWidth)
{ {
WriteLine(value, args); throw new NotImplementedException();
} }
public void WriteLine(string format, params object[] args) public ConsoleKeyInfo ReadKey()
{ {
Write(format, args); throw new NotImplementedException();
} }
public void WriteLine(string value) public string ReadLine()
{ {
Write(value); throw new NotImplementedException();
} }
public void WriteLine(object value) public void ReadSecureString(SecureString secureString)
{ {
Write(value); throw new NotImplementedException();
} }
public void Write(string value) => this.Messages.Add(Message.CreateInfo(value));
public void Write(object value) => this.Write(value.ToString());
public void Write(string format, params object[] args) => this.Write(string.Format(format, args));
public void WriteError(string value) => this.Messages.Add(Message.CreateError(value));
public void WriteError(object value) => this.WriteError(value.ToString());
public void WriteError(string format, params object[] args) => this.WriteError(string.Format(format, args));
public void WriteLine() public void WriteLine()
{ {
} }
public void WriteWarning(bool prependWarningText, string value, params object[] args) public void WriteLine(string value) => this.Write(value);
{
WriteWarning(value, args);
}
public void WriteWarning(string value, params object[] args) public void WriteLine(object value) => this.Write(value);
{
WriteWarning(string.Format(value, args));
}
public void WriteWarning(bool prependWarningText, string value) public void WriteLine(string format, params object[] args) => this.Write(format, args);
{
WriteWarning(value);
}
public void WriteWarning(string value) public void WriteLine(ConsoleColor color, string value, params object[] args) => this.Write(value, args);
{
Messages.Add(Message.CreateWarn(value));
}
public void Log(MessageLevel level, string message, params object[] args) public void WriteWarning(string value) => this.Messages.Add(Message.CreateWarn(value));
{
switch (level)
{
case MessageLevel.Error:
WriteError(message, args);
return;
case MessageLevel.Warning:
WriteWarning(message, args);
return;
case MessageLevel.Info:
Write(message, args);
return;
}
}
public FileConflictResolution ResolveFileConflict(string message) public void WriteWarning(string value, params object[] args) => this.WriteWarning(string.Format(value, args));
{
throw new NotImplementedException(); public void WriteWarning(bool prependWarningText, string value) => this.WriteWarning(value);
}
public void WriteWarning(bool prependWarningText, string value, params object[] args) => this.WriteWarning(value, args);
} }
public static Response Pack(NuGetPackRequest request) public static Response Pack(NuGetPackRequest request)
{ {
var console = new Console(); var console = new Console();
PackageBuilder builder = new PackageBuilder();
var command = new PackCommand var command = new PackCommand
{ {
BasePath = PathTools.OptimizePath(request.BaseDirectory), BasePath = PathTools.OptimizePath(request.BaseDirectory),
@ -174,7 +127,6 @@ namespace MicroBuildServer.DotNetBuilder
Version = request.Version, Version = request.Version,
Console = console, Console = console,
Verbosity = Verbosity.Detailed, Verbosity = Verbosity.Detailed,
Rules = new IPackageRule[0],
}; };
command.Arguments.Add(request.SpecPath); command.Arguments.Add(request.SpecPath);
@ -220,7 +172,6 @@ namespace MicroBuildServer.DotNetBuilder
PackageBuilder builder = new PackageBuilder(); PackageBuilder builder = new PackageBuilder();
var command = new RestoreCommand var command = new RestoreCommand
{ {
FileSystem = new PhysicalFileSystem(PathTools.OptimizePath(request.BaseDirectory)),
Console = console, Console = console,
Verbosity = Verbosity.Detailed, Verbosity = Verbosity.Detailed,
}; };

@ -7,14 +7,33 @@
<bindingRedirect oldVersion="0.0.0.0-2.6.3.13283" newVersion="2.6.3.13283" /> <bindingRedirect oldVersion="0.0.0.0-2.6.3.13283" newVersion="2.6.3.13283" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<!-- For EntityFramework. Do not redirect other MSBuild assemblies, as NuGet operations will then fail --> <assemblyIdentity name="Microsoft.Build" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-15.1.0.0" newVersion="15.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Build.Framework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="Microsoft.Build.Framework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-15.1.0.0" newVersion="15.1.0.0" /> <bindingRedirect oldVersion="0.0.0.0-15.1.0.0" newVersion="15.1.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Microsoft.Build" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="Microsoft.Build.Tasks.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-15.1.0.0" newVersion="15.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Build.Utilities.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-15.1.0.0" newVersion="15.1.0.0" /> <bindingRedirect oldVersion="0.0.0.0-15.1.0.0" newVersion="15.1.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.CommandLineUtils" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.1.0" newVersion="1.2.1.0" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup></configuration>

@ -5,9 +5,30 @@
<package id="Microsoft.Build.Runtime" version="15.1.548" targetFramework="net46" /> <package id="Microsoft.Build.Runtime" version="15.1.548" targetFramework="net46" />
<package id="Microsoft.Build.Tasks.Core" version="15.1.548" targetFramework="net46" /> <package id="Microsoft.Build.Tasks.Core" version="15.1.548" targetFramework="net46" />
<package id="Microsoft.Build.Utilities.Core" version="15.1.548" targetFramework="net46" /> <package id="Microsoft.Build.Utilities.Core" version="15.1.548" targetFramework="net46" />
<package id="Microsoft.Extensions.CommandLineUtils" version="1.1.0" targetFramework="net46" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net46" /> <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net46" />
<package id="NuGet.CommandLine" version="2.8.5" targetFramework="net4" /> <package id="NuGet.Client" version="4.0.0" targetFramework="net46" />
<package id="NuGet.CommandLine" version="3.5.0" targetFramework="net46" developmentDependency="true" />
<package id="NuGet.Commands" version="4.0.0" targetFramework="net46" />
<package id="NuGet.Common" version="4.0.0" targetFramework="net46" />
<package id="NuGet.Configuration" version="4.0.0" targetFramework="net46" />
<package id="NuGet.ContentModel" version="4.0.0" targetFramework="net46" />
<package id="NuGet.DependencyResolver.Core" version="4.0.0" targetFramework="net46" />
<package id="NuGet.Frameworks" version="4.0.0" targetFramework="net46" />
<package id="NuGet.LibraryModel" version="4.0.0" targetFramework="net46" />
<package id="NuGet.Packaging" version="4.0.0" targetFramework="net46" />
<package id="NuGet.Packaging.Core" version="4.0.0" targetFramework="net46" />
<package id="NuGet.Packaging.Core.Types" version="4.0.0" targetFramework="net46" />
<package id="NuGet.ProjectModel" version="4.0.0" targetFramework="net46" />
<package id="NuGet.Protocol.Core.Types" version="4.0.0" targetFramework="net46" />
<package id="NuGet.Protocol.Core.v3" version="4.0.0" targetFramework="net46" />
<package id="NuGet.Repositories" version="4.0.0" targetFramework="net46" />
<package id="NuGet.RuntimeModel" version="4.0.0" targetFramework="net46" />
<package id="NuGet.Versioning" version="4.0.0" targetFramework="net46" />
<package id="NUnit" version="2.6.3" targetFramework="net4" /> <package id="NUnit" version="2.6.3" targetFramework="net4" />
<package id="NUnit.Runners" version="2.6.3" targetFramework="net4" /> <package id="NUnit.Runners" version="2.6.3" targetFramework="net4" />
<package id="StyleCop.Analyzers" version="1.0.0" targetFramework="net46" developmentDependency="true" /> <package id="StyleCop.Analyzers" version="1.0.0" targetFramework="net46" developmentDependency="true" />
<package id="System.Collections.Immutable" version="1.3.1" targetFramework="net46" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net46" />
</packages> </packages>
Loading…
Cancel
Save