Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Commit

Permalink
Update to NuGet 3.5.0-rc1-final
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavkm committed Dec 7, 2016
1 parent 72271b5 commit 81f0f69
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 29 deletions.
2 changes: 2 additions & 0 deletions build_projects/dotnet-cli-build/CompileTargets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public static BuildTargetResult CompileStage1(BuildTargetContext c)
[Target(nameof(PrepareTargets.Init))]
public static BuildTargetResult CompileStage2(BuildTargetContext c)
{
PrepareTargets.RestorePackagesCore(c, DotNetCli.Stage1).EnsureSuccessful();

var configuration = c.BuildContext.Get<string>("Configuration");

CleanBinObj(c, Path.Combine(c.BuildContext.BuildDirectory, "src"));
Expand Down
26 changes: 15 additions & 11 deletions build_projects/dotnet-cli-build/PrepareTargets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ public static BuildTargetResult DownloadHostAndSharedFxArchives(BuildTargetConte

Mkdirp(Path.GetDirectoryName(combinedSharedHostAndFrameworkArchiveDownloadFile));

if ( ! File.Exists(combinedSharedHostAndFrameworkArchiveDownloadFile))
if (!File.Exists(combinedSharedHostAndFrameworkArchiveDownloadFile))
{
// Needed for computing the blob path
var combinedSharedHostAndFrameworkArchiveBuildContextFile =
var combinedSharedHostAndFrameworkArchiveBuildContextFile =
c.BuildContext.Get<string>("CombinedFrameworkHostCompressedFile");

AzurePublisher.DownloadFile(
Expand Down Expand Up @@ -225,11 +225,11 @@ public static BuildTargetResult DownloadHostAndSharedFxInstallers(BuildTargetCon
Mkdirp(Path.GetDirectoryName(sharedHostInstallerDownloadFile));
Mkdirp(Path.GetDirectoryName(hostFxrInstallerDownloadFile));

if ( ! File.Exists(sharedFrameworkInstallerDownloadFile))
if (!File.Exists(sharedFrameworkInstallerDownloadFile))
{
var sharedFrameworkInstallerDestinationFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
Mkdirp(Path.GetDirectoryName(sharedFrameworkInstallerDestinationFile));

AzurePublisher.DownloadFile(
AzurePublisher.CalculateInstallerBlob(
sharedFrameworkInstallerDestinationFile,
Expand All @@ -239,8 +239,8 @@ public static BuildTargetResult DownloadHostAndSharedFxInstallers(BuildTargetCon

File.Copy(sharedFrameworkInstallerDownloadFile, sharedFrameworkInstallerDestinationFile, true);
}
if ( ! File.Exists(sharedHostInstallerDownloadFile))

if (!File.Exists(sharedHostInstallerDownloadFile))
{
var sharedHostInstallerDestinationFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
Mkdirp(Path.GetDirectoryName(sharedHostInstallerDestinationFile));
Expand All @@ -255,7 +255,7 @@ public static BuildTargetResult DownloadHostAndSharedFxInstallers(BuildTargetCon
File.Copy(sharedHostInstallerDownloadFile, sharedHostInstallerDestinationFile, true);
}

if ( ! File.Exists(hostFxrInstallerDownloadFile))
if (!File.Exists(hostFxrInstallerDownloadFile))
{
var hostFxrInstallerDestinationFile = c.BuildContext.Get<string>("HostFxrInstallerFile");
Mkdirp(Path.GetDirectoryName(hostFxrInstallerDestinationFile));
Expand All @@ -277,7 +277,7 @@ public static BuildTargetResult DownloadHostAndSharedFxInstallers(BuildTargetCon
public static BuildTargetResult CheckPackageCache(BuildTargetContext c)
{
var ciBuild = string.Equals(Environment.GetEnvironmentVariable("CI_BUILD"), "1", StringComparison.Ordinal);

// Always set the package cache location local to the build
Environment.SetEnvironmentVariable("NUGET_PACKAGES", Dirs.NuGetPackages);

Expand Down Expand Up @@ -331,11 +331,15 @@ public static BuildTargetResult CheckPackageCache(BuildTargetContext c)
public static BuildTargetResult RestorePackages(BuildTargetContext c)
{
var dotnet = DotNetCli.Stage0;
return RestorePackagesCore(c, dotnet);
}

public static BuildTargetResult RestorePackagesCore(BuildTargetContext c, DotNetCli dotnet)
{
dotnet.Restore("--verbosity", "verbose", "--disable-parallel")
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "src"))
.Execute()
.EnsureSuccessful();
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "src"))
.Execute()
.EnsureSuccessful();
dotnet.Restore("--verbosity", "verbose", "--disable-parallel", "--infer-runtimes")
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "tools"))
.Execute()
Expand Down
2 changes: 1 addition & 1 deletion build_projects/dotnet-cli-build/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"System.Runtime.Serialization.Primitives": "4.3.0",
"System.Xml.XmlSerializer": "4.3.0",
"WindowsAzure.Storage": "6.2.2-preview",
"NuGet.CommandLine.XPlat": "3.5.0-beta2-1484",
"NuGet.CommandLine.XPlat": "3.5.0-rc1-final",
"Microsoft.DotNet.Cli.Build.Framework": {
"target": "project"
},
Expand Down
2 changes: 1 addition & 1 deletion build_projects/update-dependencies/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"Microsoft.DotNet.Cli.Build.Framework": {
"target": "project"
},
"NuGet.Versioning": "3.5.0-beta2-1484",
"NuGet.Versioning": "3.5.0-rc1-final",
"Newtonsoft.Json": "9.0.1",
"Octokit": "0.18.0",
"Microsoft.Net.Http": "2.2.29"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public string GetLockFilePath(string packageId, NuGetVersion version, NuGetFrame

return Path.Combine(
GetBaseToolPath(packageId),
version.ToNormalizedString(),
version.ToNormalizedString().ToLowerInvariant(),
framework.GetShortFolderName(),
"project.lock.json");
}
Expand All @@ -65,7 +65,7 @@ private string GetBaseToolPath(string packageId)
return Path.Combine(
_packagesDirectory,
".tools",
packageId);
packageId.ToLowerInvariant());
}

private IEnumerable<NuGetVersion> GetAvailableToolVersions(string packageId)
Expand Down
8 changes: 4 additions & 4 deletions src/Microsoft.DotNet.Cli.Utils/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"Microsoft.DotNet.ProjectModel": {
"target": "project"
},
"NuGet.Versioning": "3.5.0-beta2-1484",
"NuGet.Packaging": "3.5.0-beta2-1484",
"NuGet.Frameworks": "3.5.0-beta2-1484",
"NuGet.ProjectModel": "3.5.0-beta2-1484"
"NuGet.Versioning": "3.5.0-rc1-final",
"NuGet.Packaging": "3.5.0-rc1-final",
"NuGet.Frameworks": "3.5.0-rc1-final",
"NuGet.ProjectModel": "3.5.0-rc1-final"
},
"frameworks": {
"net451": {
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.DotNet.ProjectModel/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"target": "project"
},
"Newtonsoft.Json": "9.0.1",
"NuGet.Packaging": "3.5.0-beta2-1484",
"NuGet.RuntimeModel": "3.5.0-beta2-1484",
"NuGet.Packaging": "3.5.0-rc1-final",
"NuGet.RuntimeModel": "3.5.0-rc1-final",
"System.Reflection.Metadata": "1.4.1"
},
"frameworks": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Linq;
using Microsoft.DotNet.Tools.Test;
using Microsoft.Extensions.Testing.Abstractions;
using NuGet.Protocol.Core.v3;

namespace Microsoft.DotNet.Cli.Tools.Test
{
Expand Down
4 changes: 2 additions & 2 deletions src/dotnet/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
},
"dependencies": {
"NuGet.Commands": {
"version": "3.5.0-beta2-1484",
"version": "3.5.0-rc1-final",
"exclude": "compile"
},
"NuGet.CommandLine.XPlat": "3.5.0-beta2-1484",
"NuGet.CommandLine.XPlat": "3.5.0-rc1-final",
"Newtonsoft.Json": "9.0.1",
"System.Text.Encoding.CodePages": "4.0.1",
"System.Diagnostics.FileVersionInfo": "4.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public void It_resolves_tools_whose_package_name_is_different_than_dll_name()
var command = factory.Create("dotnet-tool-with-output-name", null);

command.CommandArgs.Should().Contain(
Path.Combine("ToolWithOutputName", "1.0.0", "lib", "netcoreapp1.0", "dotnet-tool-with-output-name.dll"));
Path.Combine("toolwithoutputname", "1.0.0", "lib", "netcoreapp1.0", "dotnet-tool-with-output-name.dll"));
}
}
}
8 changes: 4 additions & 4 deletions test/Microsoft.DotNet.Cli.Utils.Tests/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
},
"System.Diagnostics.TraceSource": "4.3.0",
"System.Runtime.Serialization.Primitives": "4.3.0",
"NuGet.Versioning": "3.5.0-beta2-1484",
"NuGet.Packaging": "3.5.0-beta2-1484",
"NuGet.Frameworks": "3.5.0-beta2-1484",
"NuGet.ProjectModel": "3.5.0-beta2-1484",
"NuGet.Versioning": "3.5.0-rc1-final",
"NuGet.Packaging": "3.5.0-rc1-final",
"NuGet.Frameworks": "3.5.0-rc1-final",
"NuGet.ProjectModel": "3.5.0-rc1-final",
"Microsoft.DotNet.ProjectModel": {
"target": "project"
},
Expand Down

0 comments on commit 81f0f69

Please sign in to comment.