diff --git a/DotNetBuilder/MicroBuildServer.DotNetBuilder.csproj b/DotNetBuilder/MicroBuildServer.DotNetBuilder.csproj
index 5e8043c..4090f91 100644
--- a/DotNetBuilder/MicroBuildServer.DotNetBuilder.csproj
+++ b/DotNetBuilder/MicroBuildServer.DotNetBuilder.csproj
@@ -56,12 +56,84 @@
..\packages\Microsoft.Build.Utilities.Core.15.1.548\lib\net46\Microsoft.Build.Utilities.Core.dll
True
+
+ ..\packages\Microsoft.Extensions.CommandLineUtils.1.1.0\lib\net451\Microsoft.Extensions.CommandLineUtils.dll
+ True
+
..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll
True
- ..\packages\NuGet.CommandLine.2.8.5\tools\NuGet.exe
+ ..\packages\NuGet.CommandLine.3.5.0\tools\NuGet.exe
+
+
+ ..\packages\NuGet.Client.4.0.0\lib\net45\NuGet.Client.dll
+ True
+
+
+ ..\packages\NuGet.Commands.4.0.0\lib\net45\NuGet.Commands.dll
+ True
+
+
+ ..\packages\NuGet.Common.4.0.0\lib\net45\NuGet.Common.dll
+ True
+
+
+ ..\packages\NuGet.Configuration.4.0.0\lib\net45\NuGet.Configuration.dll
+ True
+
+
+ ..\packages\NuGet.ContentModel.4.0.0\lib\net45\NuGet.ContentModel.dll
+ True
+
+
+ ..\packages\NuGet.DependencyResolver.Core.4.0.0\lib\net45\NuGet.DependencyResolver.Core.dll
+ True
+
+
+ ..\packages\NuGet.Frameworks.4.0.0\lib\net45\NuGet.Frameworks.dll
+ True
+
+
+ ..\packages\NuGet.LibraryModel.4.0.0\lib\net45\NuGet.LibraryModel.dll
+ True
+
+
+ ..\packages\NuGet.Packaging.4.0.0\lib\net45\NuGet.Packaging.dll
+ True
+
+
+ ..\packages\NuGet.Packaging.Core.4.0.0\lib\net45\NuGet.Packaging.Core.dll
+ True
+
+
+ ..\packages\NuGet.Packaging.Core.Types.4.0.0\lib\net45\NuGet.Packaging.Core.Types.dll
+ True
+
+
+ ..\packages\NuGet.ProjectModel.4.0.0\lib\net45\NuGet.ProjectModel.dll
+ True
+
+
+ ..\packages\NuGet.Protocol.Core.Types.4.0.0\lib\net45\NuGet.Protocol.Core.Types.dll
+ True
+
+
+ ..\packages\NuGet.Protocol.Core.v3.4.0.0\lib\net45\NuGet.Protocol.Core.v3.dll
+ True
+
+
+ ..\packages\NuGet.Repositories.4.0.0\lib\net45\NuGet.Repositories.dll
+ True
+
+
+ ..\packages\NuGet.RuntimeModel.4.0.0\lib\net45\NuGet.RuntimeModel.dll
+ True
+
+
+ ..\packages\NuGet.Versioning.4.0.0\lib\net45\NuGet.Versioning.dll
+ True
..\packages\NUnit.Runners.2.6.3\tools\lib\nunit-console-runner.dll
@@ -91,7 +163,26 @@
..\packages\StyleCop.Analyzers.1.0.0\analyzers\dotnet\cs\StyleCop.Analyzers.dll
+
+ ..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll
+ True
+
+
+
+
+
+
+ ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
+ True
+
+
+
+ ..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll
+ True
+
+
+
diff --git a/DotNetBuilder/NuGetter.cs b/DotNetBuilder/NuGetter.cs
index 7045c01..1dca33a 100644
--- a/DotNetBuilder/NuGetter.cs
+++ b/DotNetBuilder/NuGetter.cs
@@ -1,8 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Security;
using NuGet;
-using NuGet.Commands;
+using NuGet.CommandLine;
using NuGet.Common;
namespace MicroBuildServer.DotNetBuilder
@@ -13,11 +14,6 @@ namespace MicroBuildServer.DotNetBuilder
{
public readonly Messages Messages = new Messages();
- public bool Confirm(string description)
- {
- throw new NotImplementedException();
- }
-
public int CursorLeft
{
get { throw new NotImplementedException(); }
@@ -26,35 +22,10 @@ namespace MicroBuildServer.DotNetBuilder
public bool IsNonInteractive
{
- get { return true; }
+ get { 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
{
get { return Verbosity.Detailed; }
@@ -67,106 +38,88 @@ namespace MicroBuildServer.DotNetBuilder
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)
- {
- Messages.Add(Message.CreateInfo(value));
- }
+ public void LogDebug(string data) => this.Messages.Add(Message.CreateInfo(data));
- public void Write(object value)
- {
- Write(value.ToString());
- }
+ public void LogError(string data) => this.Messages.Add(Message.CreateError(data));
- public void WriteError(string format, params object[] args)
- {
- WriteError(string.Format(format, args));
- }
+ public void LogErrorSummary(string data) => this.Messages.Add(Message.CreateError(data));
- public void WriteError(string value)
- {
- Messages.Add(Message.CreateError(value));
- }
+ public void LogInformation(string data) => this.Messages.Add(Message.CreateInfo(data));
+
+ 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 WriteWarning(bool prependWarningText, string value, params object[] args)
- {
- WriteWarning(value, args);
- }
+ public void WriteLine(string value) => this.Write(value);
- public void WriteWarning(string value, params object[] args)
- {
- WriteWarning(string.Format(value, args));
- }
+ public void WriteLine(object value) => this.Write(value);
- public void WriteWarning(bool prependWarningText, string value)
- {
- WriteWarning(value);
- }
+ public void WriteLine(string format, params object[] args) => this.Write(format, args);
- public void WriteWarning(string value)
- {
- Messages.Add(Message.CreateWarn(value));
- }
+ public void WriteLine(ConsoleColor color, string value, params object[] args) => this.Write(value, args);
- public void Log(MessageLevel level, string message, params object[] args)
- {
- switch (level)
- {
- case MessageLevel.Error:
- WriteError(message, args);
- return;
- case MessageLevel.Warning:
- WriteWarning(message, args);
- return;
- case MessageLevel.Info:
- Write(message, args);
- return;
- }
- }
+ public void WriteWarning(string value) => this.Messages.Add(Message.CreateWarn(value));
- public FileConflictResolution ResolveFileConflict(string message)
- {
- throw new NotImplementedException();
- }
+ public void WriteWarning(string value, params object[] args) => this.WriteWarning(string.Format(value, args));
+
+ 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)
{
var console = new Console();
- PackageBuilder builder = new PackageBuilder();
var command = new PackCommand
{
BasePath = PathTools.OptimizePath(request.BaseDirectory),
@@ -174,7 +127,6 @@ namespace MicroBuildServer.DotNetBuilder
Version = request.Version,
Console = console,
Verbosity = Verbosity.Detailed,
- Rules = new IPackageRule[0],
};
command.Arguments.Add(request.SpecPath);
@@ -220,7 +172,6 @@ namespace MicroBuildServer.DotNetBuilder
PackageBuilder builder = new PackageBuilder();
var command = new RestoreCommand
{
- FileSystem = new PhysicalFileSystem(PathTools.OptimizePath(request.BaseDirectory)),
Console = console,
Verbosity = Verbosity.Detailed,
};
diff --git a/DotNetBuilder/app.config b/DotNetBuilder/app.config
index 34e429b..448d8e7 100644
--- a/DotNetBuilder/app.config
+++ b/DotNetBuilder/app.config
@@ -7,14 +7,33 @@
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DotNetBuilder/packages.config b/DotNetBuilder/packages.config
index 7d0ffc9..5836334 100644
--- a/DotNetBuilder/packages.config
+++ b/DotNetBuilder/packages.config
@@ -5,9 +5,30 @@
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file