Skip to content

Commit

Permalink
Add resolve NuGet using TargetFramework
Browse files Browse the repository at this point in the history
  • Loading branch information
devlead authored and daveaglick committed Jun 24, 2019
1 parent 1ebacb9 commit 630b2c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Wyam.Configuration/NuGet/PackageInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ internal void InstallPackages(FilePath configFilePath)
}
catch (Exception ex)
{
Trace.Verbose($"Exception while installing packages: {(ex is AggregateException ? string.Join("; ", ((AggregateException)ex).InnerExceptions.Select(x => x.Message)) : ex.Message)}");
Trace.Verbose($"Exception while installing packages: {(ex is AggregateException aex ? aex.Flatten() : ex)}");
Trace.Warning("Error while installing packages, attempting without remote repositories");
InstallPackages(packageManager, Array.Empty<SourceRepository>(), installedPackages);
}
Expand All @@ -230,7 +230,7 @@ private void InstallPackages(NuGetPackageManager packageManager, IReadOnlyList<S
{
foreach (Package package in _packages.Values)
{
package.Install(installationRepositories, installedPackages, packageManager).Wait();
package.Install(installationRepositories, installedPackages, packageManager).GetAwaiter().GetResult();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public WyamFolderNuGetProject(IFileSystem fileSystem, AssemblyLoader assemblyLoa
_assemblyLoader = assemblyLoader;
_currentFramework = currentFramework;
_installedPackages = installedPackages;
InternalMetadata[NuGetProjectMetadataKeys.TargetFramework] = _currentFramework;
}

// This gets called for every package install, including dependencies, and is our only chance to handle dependency PackageIdentity instances
Expand Down

0 comments on commit 630b2c5

Please sign in to comment.