Merge pull request #2148 from dotnet/pakrym/remove-inference
Remove rid inference
This commit is contained in:
commit
a21e0ea6b4
3 changed files with 8 additions and 14 deletions
|
@ -75,7 +75,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
CleanNuGetTempCache();
|
||||
|
||||
var dotnet = DotNetCli.Stage2;
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel").WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestPackages")).Execute().EnsureSuccessful();
|
||||
dotnet.Restore("--verbosity", "verbose", "--infer-runtimes", "--disable-parallel").WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestPackages")).Execute().EnsureSuccessful();
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
@ -90,16 +90,16 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
var dotnet = DotNetCli.Stage2;
|
||||
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel", "--fallbacksource", Dirs.TestPackages)
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel", "--infer-runtimes", "--fallbacksource", Dirs.TestPackages)
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestProjects"))
|
||||
.Execute().EnsureSuccessful();
|
||||
|
||||
// The 'ProjectModelServer' directory contains intentionally-unresolved dependencies, so don't check for success. Also, suppress the output
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel")
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel", "--infer-runtimes")
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "ProjectModelServer", "DthTestProjects"))
|
||||
.Execute();
|
||||
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel")
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel", "--infer-runtimes")
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "ProjectModelServer", "DthUpdateSearchPathSample"))
|
||||
.Execute();
|
||||
|
||||
|
@ -112,7 +112,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
var dotnet = DotNetCli.Stage2;
|
||||
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel", "--fallbacksource", Dirs.TestPackages)
|
||||
dotnet.Restore("--verbosity", "verbose", "--disable-parallel", "--infer-runtimes", "--fallbacksource", Dirs.TestPackages)
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "DesktopTestProjects"))
|
||||
.Execute().EnsureSuccessful();
|
||||
|
||||
|
@ -188,7 +188,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
CleanBinObj(c, Path.Combine(c.BuildContext.BuildDirectory, "test"));
|
||||
|
||||
CleanNuGetTempCache();
|
||||
DotNetCli.Stage2.Restore("--verbosity", "verbose", "--disable-parallel", "--fallbacksource", Dirs.TestPackages)
|
||||
DotNetCli.Stage2.Restore("--verbosity", "verbose", "--disable-parallel", "--infer-runtimes","--fallbacksource", Dirs.TestPackages)
|
||||
.WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "test"))
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
|
|
@ -35,13 +35,7 @@ namespace Microsoft.DotNet.Tools.Restore
|
|||
// "--verbosity" switch that goes BEFORE the command
|
||||
var quiet = args.Any(s => s.Equals("--quiet", StringComparison.OrdinalIgnoreCase));
|
||||
args = args.Where(s => !s.Equals("--quiet", StringComparison.OrdinalIgnoreCase)).ToArray();
|
||||
|
||||
// Always infer runtimes in dotnet-restore (for now).
|
||||
if (!args.Any(s => s.Equals("--infer-runtimes", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
args = Enumerable.Concat(new [] { "--infer-runtimes" }, args).ToArray();
|
||||
}
|
||||
|
||||
|
||||
app.OnExecute(() =>
|
||||
{
|
||||
try
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
|
||||
public override CommandResult Execute(string args="")
|
||||
{
|
||||
args = $"restore {args}";
|
||||
args = $"restore {args} --infer-runtimes";
|
||||
return base.Execute(args);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue