diff --git a/build/Microsoft.DotNet.Cli.Compile.targets b/build/Microsoft.DotNet.Cli.Compile.targets
index 023585664..3d4ad94f0 100644
--- a/build/Microsoft.DotNet.Cli.Compile.targets
+++ b/build/Microsoft.DotNet.Cli.Compile.targets
@@ -3,8 +3,16 @@
+
+ runtimes/any/native
+ $(RepoRoot)/resources/core-sdk
+
+
+
+
+
+
@@ -85,7 +93,7 @@
+ DestinationFiles="@(SharedFramework->'$(StageDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
+ ProjectPath="$(SrcDirectory)/redist" />
@@ -121,36 +129,26 @@
File="%(SdkOutputChModTargets.FullPath)"
Mode="%(SdkOutputChModTargets.Mode)" />
-
+
-
+
-
+
-
-
-
+
+ DepsFile="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json"
+ NewName="%(BundledTools.Identity).deps.json" />
-
-
-
-
-
+
+
+
+
+
+
@@ -208,12 +210,8 @@
+ DestinationFiles="@(MSBuildTargetsToCopy->'$(SdkOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
-
-
-
diff --git a/src/dotnet/15.0/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NETCore.ImportBefore.props b/resources/core-sdk/14.1/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NETCore.ImportBefore.props
similarity index 100%
rename from src/dotnet/15.0/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NETCore.ImportBefore.props
rename to resources/core-sdk/14.1/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NETCore.ImportBefore.props
diff --git a/src/dotnet/15.0/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NuGet.ImportBefore.props b/resources/core-sdk/14.1/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NuGet.ImportBefore.props
similarity index 100%
rename from src/dotnet/15.0/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NuGet.ImportBefore.props
rename to resources/core-sdk/14.1/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NuGet.ImportBefore.props
diff --git a/src/dotnet/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NETCore.ImportAfter.targets b/resources/core-sdk/14.1/Microsoft.Common.targets/ImportAfter/Microsoft.NETCore.ImportAfter.targets
similarity index 100%
rename from src/dotnet/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NETCore.ImportAfter.targets
rename to resources/core-sdk/14.1/Microsoft.Common.targets/ImportAfter/Microsoft.NETCore.ImportAfter.targets
diff --git a/src/dotnet/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NuGet.ImportAfter.targets b/resources/core-sdk/14.1/Microsoft.Common.targets/ImportAfter/Microsoft.NuGet.ImportAfter.targets
similarity index 100%
rename from src/dotnet/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NuGet.ImportAfter.targets
rename to resources/core-sdk/14.1/Microsoft.Common.targets/ImportAfter/Microsoft.NuGet.ImportAfter.targets
diff --git a/resources/core-sdk/15.0/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NETCore.ImportBefore.props b/resources/core-sdk/15.0/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NETCore.ImportBefore.props
new file mode 100644
index 000000000..8d4b59d14
--- /dev/null
+++ b/resources/core-sdk/15.0/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NETCore.ImportBefore.props
@@ -0,0 +1,17 @@
+
+
+
+ $(MSBuildExtensionsPath)\Microsoft.DotNet.Core.Sdk.props
+
+
+
diff --git a/resources/core-sdk/15.0/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NuGet.ImportBefore.props b/resources/core-sdk/15.0/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NuGet.ImportBefore.props
new file mode 100644
index 000000000..b535067fb
--- /dev/null
+++ b/resources/core-sdk/15.0/Imports/Microsoft.Common.props/ImportBefore/Microsoft.NuGet.ImportBefore.props
@@ -0,0 +1,17 @@
+
+
+
+ $(MSBuildExtensionsPath)\Microsoft.NuGet.props
+
+
+
diff --git a/resources/core-sdk/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NETCore.ImportAfter.targets b/resources/core-sdk/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NETCore.ImportAfter.targets
new file mode 100644
index 000000000..7f2fab3de
--- /dev/null
+++ b/resources/core-sdk/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NETCore.ImportAfter.targets
@@ -0,0 +1,17 @@
+
+
+
+ $(MSBuildExtensionsPath)\Microsoft.DotNet.Core.Sdk.targets
+
+
+
diff --git a/resources/core-sdk/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NuGet.ImportAfter.targets b/resources/core-sdk/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NuGet.ImportAfter.targets
new file mode 100644
index 000000000..b1da40f46
--- /dev/null
+++ b/resources/core-sdk/15.0/Microsoft.Common.targets/ImportAfter/Microsoft.NuGet.ImportAfter.targets
@@ -0,0 +1,17 @@
+
+
+
+ $(MSBuildExtensionsPath)\Microsoft.NuGet.targets
+
+
+
diff --git a/src/dotnet/Microsoft.DotNet.Core.Sdk.props b/resources/core-sdk/Microsoft.DotNet.Core.Sdk.props
similarity index 100%
rename from src/dotnet/Microsoft.DotNet.Core.Sdk.props
rename to resources/core-sdk/Microsoft.DotNet.Core.Sdk.props
diff --git a/src/dotnet/Microsoft.DotNet.Core.Sdk.targets b/resources/core-sdk/Microsoft.DotNet.Core.Sdk.targets
similarity index 100%
rename from src/dotnet/Microsoft.DotNet.Core.Sdk.targets
rename to resources/core-sdk/Microsoft.DotNet.Core.Sdk.targets
diff --git a/src/compilers/Program.cs b/src/csc/Program.cs
similarity index 100%
rename from src/compilers/Program.cs
rename to src/csc/Program.cs
diff --git a/src/compilers/project.json b/src/csc/project.json
similarity index 92%
rename from src/compilers/project.json
rename to src/csc/project.json
index b2b6ed1b8..8240b45ff 100644
--- a/src/compilers/project.json
+++ b/src/csc/project.json
@@ -1,5 +1,5 @@
{
- "version": "1.0.0-*",
+ "version": "1.0.0-featmsbuild-*",
"buildOptions": {
"emitEntryPoint": true
},
diff --git a/src/dotnet/commands/dotnet-build3/ForwardingApp.cs b/src/dotnet/ForwardingApp.cs
similarity index 100%
rename from src/dotnet/commands/dotnet-build3/ForwardingApp.cs
rename to src/dotnet/ForwardingApp.cs
diff --git a/src/dotnet/commands/dotnet-build3/MSBuildForwardingApp.cs b/src/dotnet/commands/dotnet-build3/MSBuildForwardingApp.cs
index d8037cd0c..2550aa17f 100644
--- a/src/dotnet/commands/dotnet-build3/MSBuildForwardingApp.cs
+++ b/src/dotnet/commands/dotnet-build3/MSBuildForwardingApp.cs
@@ -21,8 +21,6 @@ namespace Microsoft.DotNet.Cli
_forwardingApp = new ForwardingApp(
GetMSBuildExePath(),
argsToForward,
- depsFile: GetDepsFile(),
- runtimeConfig: GetRuntimeConfig(),
environmentVariables: GetEnvironmentVariables());
}
@@ -56,19 +54,18 @@ namespace Microsoft.DotNet.Cli
private static string GetRuntimeConfig()
{
- return Path.Combine(AppContext.BaseDirectory, "dotnet.runtimeconfig.json");
+ return Path.Combine(AppContext.BaseDirectory, "msbuild.runtimeconfig.json");
}
private static string GetDepsFile()
{
- return Path.Combine(AppContext.BaseDirectory, "dotnet.deps.json");
+ return Path.Combine(AppContext.BaseDirectory, "msbuild.deps.json");
}
private static string GetMSBuildExePath()
{
return Path.Combine(
AppContext.BaseDirectory,
- "runtimes", "any", "native",
s_msbuildExeName);
}
diff --git a/src/dotnet/commands/dotnet-restore/NuGet3.cs b/src/dotnet/commands/dotnet-restore/NuGet3.cs
index 8033f96f6..7fd2a4e84 100644
--- a/src/dotnet/commands/dotnet-restore/NuGet3.cs
+++ b/src/dotnet/commands/dotnet-restore/NuGet3.cs
@@ -4,7 +4,6 @@ using System.IO;
using System.Linq;
using System.Reflection;
using Microsoft.DotNet.Cli.Utils;
-using NugetProgram = NuGet.CommandLine.XPlat.Program;
namespace Microsoft.DotNet.Tools.Restore
{
@@ -20,18 +19,11 @@ namespace Microsoft.DotNet.Tools.Restore
}
prefixArgs.Add("restore");
- var result = Run(Enumerable.Concat(
+ var result = new NuGetForwardingApp(Enumerable.Concat(
prefixArgs,
- args).ToArray());
+ args).ToArray()).Execute();
return result;
}
-
- private static int Run(string[] nugetArgs)
- {
- var nugetAsm = typeof(NugetProgram).GetTypeInfo().Assembly;
- var mainMethod = nugetAsm.EntryPoint;
- return (int)mainMethod.Invoke(null, new object[] { nugetArgs });
- }
}
}
diff --git a/src/dotnet/commands/dotnet-restore/NuGetForwardingApp.cs b/src/dotnet/commands/dotnet-restore/NuGetForwardingApp.cs
new file mode 100644
index 000000000..aacbb8d53
--- /dev/null
+++ b/src/dotnet/commands/dotnet-restore/NuGetForwardingApp.cs
@@ -0,0 +1,44 @@
+// Copyright (c) .NET Foundation and contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using Microsoft.DotNet.Cli;
+using Microsoft.DotNet.Cli.Utils;
+using Microsoft.DotNet.InternalAbstractions;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Microsoft.DotNet.Tools.Restore
+{
+ public class NuGetForwardingApp
+ {
+ private const string s_nugetExeName = "NuGet.CommandLine.XPlat.dll";
+ private readonly ForwardingApp _forwardingApp;
+
+ public NuGetForwardingApp(string[] argsToForward)
+ {
+ _forwardingApp = new ForwardingApp(
+ GetNuGetExePath(),
+ argsToForward);
+ }
+
+ public int Execute()
+ {
+ return _forwardingApp.Execute();
+ }
+
+ private static string GetHostPath()
+ {
+ return new Muxer().MuxerPath;
+ }
+
+ private static string GetNuGetExePath()
+ {
+ return Path.Combine(
+ AppContext.BaseDirectory,
+ s_nugetExeName);
+ }
+ }
+}
diff --git a/src/dotnet/commands/dotnet-restore/Program.cs b/src/dotnet/commands/dotnet-restore/Program.cs
index 7d45322c1..c2ecf5205 100644
--- a/src/dotnet/commands/dotnet-restore/Program.cs
+++ b/src/dotnet/commands/dotnet-restore/Program.cs
@@ -17,35 +17,7 @@ namespace Microsoft.DotNet.Tools.Restore
{
DebugHelper.HandleDebugSwitch(ref args);
- var app = new CommandLineApplication(false)
- {
- Name = "dotnet restore",
- FullName = ".NET project dependency restorer",
- Description = "Restores dependencies listed in project.json"
- };
-
-
- app.OnExecute(() =>
- {
- try
- {
- return NuGet3.Restore(args);
- }
- catch (InvalidOperationException e)
- {
- Console.WriteLine(e.Message);
-
- return -1;
- }
- catch (Exception e)
- {
- Console.WriteLine(e.Message);
-
- return -2;
- }
- });
-
- return app.Execute(args);
+ return NuGet3.Restore(args);
}
}
}
diff --git a/src/dotnet/project.json b/src/dotnet/project.json
index 5257e2d0d..abb9cc548 100644
--- a/src/dotnet/project.json
+++ b/src/dotnet/project.json
@@ -25,19 +25,7 @@
]
}
},
- "publishOptions": {
- "include": [
- "15.0/**",
- "*.props",
- "*.targets"
- ]
- },
"dependencies": {
- "NuGet.Commands": {
- "version": "3.5.0-rc1-1697",
- "exclude": "compile"
- },
- "NuGet.CommandLine.XPlat": "3.5.0-rc1-1697",
"Newtonsoft.Json": "9.0.1",
"System.Text.Encoding.CodePages": "4.0.1",
"System.Diagnostics.FileVersionInfo": "4.0.0",
@@ -71,17 +59,9 @@
"exclude": "compile"
},
- "MSBuild": "0.1.0-preview-00029-160805",
- "Microsoft.Build.Framework": "0.1.0-preview-00029-160805",
- "Microsoft.Build.Tasks.Core": "0.1.0-preview-00029-160805",
- "Microsoft.Build.Utilities.Core": "0.1.0-preview-00029-160805",
- "Microsoft.Build.Targets": "0.1.0-preview-00029-160805",
- "Microsoft.Build": "0.1.0-preview-00029-160805",
- "Microsoft.Net.Compilers.netcore": "1.3.0",
- "Microsoft.Net.Compilers.Targets.NetCore": "0.1.5-dev",
- "Microsoft.Cci": "4.0.0-rc3-24128-00",
- "Microsoft.Composition": "1.0.30",
- "Microsoft.NuGet.Build.Tasks": "1.0.0-alpha-000002",
+
+ "Microsoft.Build": "0.1.0-preview-00029-160805",
+ "Microsoft.Build.Framework": "0.1.0-preview-00029-160805",
"Microsoft.DotNet.Core.Build.Tasks": {
"target": "project"
diff --git a/src/nuget/project.json b/src/nuget/project.json
new file mode 100644
index 000000000..a1cd2078d
--- /dev/null
+++ b/src/nuget/project.json
@@ -0,0 +1,27 @@
+{
+ "version": "1.0.0-featmsbuild-*",
+ "buildOptions": {
+ "emitEntryPoint": true
+ },
+ "dependencies": {
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ },
+ "NuGet.Commands": {
+ "version": "3.5.0-rc1-1697",
+ "exclude": "compile"
+ },
+ "NuGet.CommandLine.XPlat": "3.5.0-rc1-1697"
+ },
+ "frameworks": {
+ "netcoreapp1.0": {
+ "imports": [
+ "dnxcore50",
+ "netstandardapp1.5",
+ "portable-net45+win8",
+ "portable-net45+wp80+win8+wpa81+dnxcore50"
+ ]
+ }
+ }
+}
diff --git a/src/redist/project.json b/src/redist/project.json
new file mode 100644
index 000000000..1a82d2be8
--- /dev/null
+++ b/src/redist/project.json
@@ -0,0 +1,26 @@
+{
+ "version": "1.0.0-featmsbuild-*",
+ "buildOptions": {
+ "emitEntryPoint": true
+ },
+ "dependencies": {
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ },
+ "csc": "1.0.0-featmsbuild-*",
+ "dotnet": "1.0.0-featmsbuild-*",
+ "nuget": "1.0.0-featmsbuild-*",
+ "tool_msbuild": "1.0.0-featmsbuild-*"
+ },
+ "frameworks": {
+ "netcoreapp1.0": {
+ "imports": [
+ "dnxcore50",
+ "netstandardapp1.5",
+ "portable-net45+win8",
+ "portable-net45+wp80+win8+wpa81+dnxcore50"
+ ]
+ }
+ }
+}
diff --git a/src/tool_msbuild/project.json b/src/tool_msbuild/project.json
new file mode 100644
index 000000000..aaccda9a0
--- /dev/null
+++ b/src/tool_msbuild/project.json
@@ -0,0 +1,31 @@
+{
+ "version": "1.0.0-featmsbuild-*",
+ "buildOptions": {
+ "emitEntryPoint": true
+ },
+ "dependencies": {
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ },
+ "MSBuild": "0.1.0-preview-00029-160805",
+ "Microsoft.Build.Framework": "0.1.0-preview-00029-160805",
+ "Microsoft.Build.Tasks.Core": "0.1.0-preview-00029-160805",
+ "Microsoft.Build.Utilities.Core": "0.1.0-preview-00029-160805",
+ "Microsoft.Build.Targets": "0.1.0-preview-00029-160805",
+ "Microsoft.Build": "0.1.0-preview-00029-160805",
+ "Microsoft.Net.Compilers.netcore": "1.3.0",
+ "Microsoft.Net.Compilers.Targets.NetCore": "0.1.5-dev",
+ "Microsoft.Cci": "4.0.0-rc3-24128-00",
+ "Microsoft.Composition": "1.0.30",
+ "Microsoft.NuGet.Build.Tasks": "1.0.0-alpha-000002"
+ },
+ "frameworks": {
+ "netcoreapp1.0": {
+ "imports": [
+ "dnxcore50",
+ "portable-net45+win8"
+ ]
+ }
+ }
+}