Fix package code for new NuGet.
The new NuGet uses tolower paths, and we need to react to it. Port https://github.com/dotnet/cli/pull/2722 Port https://github.com/dotnet/cli/pull/3554
This commit is contained in:
parent
d54bba96cd
commit
a48def9ade
19 changed files with 150 additions and 73 deletions
|
@ -145,13 +145,16 @@ namespace Microsoft.DotNet.Tools.Run
|
|||
}
|
||||
|
||||
List<string> hostArgs = new List<string>();
|
||||
if (!_context.TargetFramework.IsDesktop())
|
||||
if (!_context.TargetFramework.IsDesktop() && _context.LockFile != null)
|
||||
{
|
||||
// Add Nuget Packages Probing Path
|
||||
var nugetPackagesRoot = _context.PackagesDirectory;
|
||||
var probingPathArg = "--additionalprobingpath";
|
||||
hostArgs.Insert(0, nugetPackagesRoot);
|
||||
hostArgs.Insert(0, probingPathArg);
|
||||
// Add Nuget Packages Probing Paths
|
||||
const string probingPathArg = "--additionalprobingpath";
|
||||
|
||||
foreach (var packageFolder in _context.LockFile.PackageFolders)
|
||||
{
|
||||
hostArgs.Insert(0, packageFolder.Path);
|
||||
hostArgs.Insert(0, probingPathArg);
|
||||
}
|
||||
}
|
||||
|
||||
// Now launch the output and give it the results
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue