Pass no additional arguments to net451 app
This commit is contained in:
parent
1428eb81cf
commit
7e73e5c379
4 changed files with 15 additions and 7 deletions
|
@ -6,7 +6,7 @@ namespace ConsoleApplication
|
|||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("NET451");
|
||||
Console.WriteLine("NET451, ARGS: " + args.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,11 +124,14 @@ namespace Microsoft.DotNet.Tools.Run
|
|||
return result;
|
||||
}
|
||||
|
||||
// Add Nuget Packages Probing Path
|
||||
var nugetPackagesRoot = _context.PackagesDirectory;
|
||||
var probingPathArg = "--additionalprobingpath";
|
||||
_args.Insert(0, nugetPackagesRoot);
|
||||
_args.Insert(0, probingPathArg);
|
||||
if (!_context.TargetFramework.IsDesktop())
|
||||
{
|
||||
// Add Nuget Packages Probing Path
|
||||
var nugetPackagesRoot = _context.PackagesDirectory;
|
||||
var probingPathArg = "--additionalprobingpath";
|
||||
_args.Insert(0, nugetPackagesRoot);
|
||||
_args.Insert(0, probingPathArg);
|
||||
}
|
||||
|
||||
// Now launch the output and give it the results
|
||||
var outputPaths = _context.GetOutputPaths(Configuration);
|
||||
|
|
|
@ -78,6 +78,11 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
args = $"run {BuildArgs()} {args}";
|
||||
return base.Execute(args);
|
||||
}
|
||||
public override CommandResult ExecuteWithCapturedOutput(string args = "")
|
||||
{
|
||||
args = $"run {BuildArgs()} {args}";
|
||||
return base.ExecuteWithCapturedOutput(args);
|
||||
}
|
||||
|
||||
private string BuildArgs()
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace Microsoft.DotNet.Tools.Run.Tests
|
|||
TestInstance instance = TestAssetsManager.CreateTestInstance(Path.Combine(RunTestsBase, "TestAppFullClr"))
|
||||
.WithLockFiles()
|
||||
.WithBuildArtifacts();
|
||||
new RunCommand(instance.TestRoot).Execute().Should().Pass();
|
||||
new RunCommand(instance.TestRoot).ExecuteWithCapturedOutput().Should().Pass().And.HaveStdOutContaining("NET451, ARGS: 0");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
Loading…
Reference in a new issue