diff --git a/build/Microsoft.DotNet.Cli.Prepare.targets b/build/Microsoft.DotNet.Cli.Prepare.targets
index 4cec3c00f..5f60ae415 100644
--- a/build/Microsoft.DotNet.Cli.Prepare.targets
+++ b/build/Microsoft.DotNet.Cli.Prepare.targets
@@ -190,8 +190,8 @@
-
+
@@ -216,7 +216,7 @@
+ ProjectPath=""%(RestoreToolsPackagesInput.FullPath)"" />
diff --git a/build/Microsoft.DotNet.Cli.Test.targets b/build/Microsoft.DotNet.Cli.Test.targets
index aea5d4f0a..2354e0cd0 100644
--- a/build/Microsoft.DotNet.Cli.Test.targets
+++ b/build/Microsoft.DotNet.Cli.Test.targets
@@ -14,7 +14,7 @@
DependsOnTargets="PrepareTests;
BuildTestAssets;
BuildTests;">
-
+
:
%3b
@@ -38,9 +38,10 @@
CLIBuildDll=$(CLIBuildDll);
Configuration=$(Configuration);
EnvironmentVariables=$(RunTestEnvironmentVariables);
+ TestProject=%(TestProjects.ProjectPath);
TestProjectName=%(TestProjects.OutputName);
TestResultXmlDir=$(TestResultXmlDir);
- ToolPath=$(Stage0PjDirectory);
+ ToolPath=$(Stage0Directory);
WorkingDirectory=%(TestProjects.ProjectDir)
@@ -71,34 +72,29 @@
SetupTestProjectData;"
Inputs="%(TestProjects.BuildInputs)"
Outputs="%(TestProjects.BuildOutput)">
-
-
+
-
+ Outputs="@(RestoreTestsInputs->'%(RelativeDir)/obj/project.assets.json');@(RestoreTestsInputs->'%(RelativeDir)/obj/%(Filename).csproj.nuget.g.props');@(RestoreTestsInputs->'%(RelativeDir)/obj/%(Filename).csproj.nuget.g.targets')">
-
+
-
+
-
-
+
+
@@ -111,8 +107,8 @@
-
+
@@ -129,8 +125,7 @@
+ ToolPath="$(Stage0PjDirectory)" />
-
+
@@ -180,8 +175,7 @@
+ ToolPath="$(Stage0PjDirectory)" />
+ ToolPath="$(Stage0PjDirectory)" />
-
+ ToolPath="$(Stage0Directory)" />
diff --git a/build/package/Microsoft.DotNet.Cli.Installer.DEB.targets b/build/package/Microsoft.DotNet.Cli.Installer.DEB.targets
index c6b64a6d2..ea518a6c3 100644
--- a/build/package/Microsoft.DotNet.Cli.Installer.DEB.targets
+++ b/build/package/Microsoft.DotNet.Cli.Installer.DEB.targets
@@ -47,7 +47,7 @@
$(RepoRoot)/Documentation/manpages
- $(RepoRoot)/test/EndToEnd
+ $(RepoRoot)/test/EndToEnd/EndToEnd.csproj
$(Stage2Directory)/sdk
diff --git a/build/test/RunTest.proj b/build/test/RunTest.proj
index 7f113afa7..bd05135fc 100644
--- a/build/test/RunTest.proj
+++ b/build/test/RunTest.proj
@@ -11,12 +11,11 @@
-
+ Logger="trx"
+ ProjectPath="$(TestProject)" />
\ No newline at end of file
diff --git a/build/test/TestProjects.targets b/build/test/TestProjects.targets
index 7ed65ea3b..505f8dd33 100644
--- a/build/test/TestProjects.targets
+++ b/build/test/TestProjects.targets
@@ -31,39 +31,42 @@
+
+
+ Include="test$(PathSeparator)TestingAbstractions$(PathSeparator)Microsoft.Extensions.Testing.Abstractions.Tests$(PathSeparator)Microsoft.Extensions.Testing.Abstractions.Tests.csproj;
+ test$(PathSeparator)TestingAbstractions$(PathSeparator)Microsoft.Extensions.Testing.Abstractions.UnitTests$(PathSeparator)Microsoft.Extensions.Testing.Abstractions.UnitTests.csproj;" />
+ Include="test$(PathSeparator)Kestrel.Tests$(PathSeparator)Kestrel.Tests.csproj" />
+ Include="test$(PathSeparator)ScriptExecutorTests$(PathSeparator)ScriptExecutorTests.csproj" />
+ Include="test$(PathSeparator)ArgumentsReflector$(PathSeparator)ArgumentsReflector.csproj;
+ test$(PathSeparator)Microsoft.DotNet.Tools.Tests.Utilities$(PathSeparator)Microsoft.DotNet.Tools.Tests.Utilities.csproj;
+ test$(PathSeparator)TestingAbstractions$(PathSeparator)TestAppWithFullPdbs$(PathSeparator)TestAppWithFullPdbs.csproj;
+ test$(PathSeparator)TestingAbstractions$(PathSeparator)TestAppWithPortablePdbs$(PathSeparator)TestAppWithPortablePdbs.csproj" />
+ Include="test$(PathSeparator)Installer$(PathSeparator)Microsoft.DotNet.Cli.Msi.Tests$(PathSeparator)Microsoft.DotNet.Cli.Msi.Tests.csproj;" />
-
+
+ Include="test$(PathSeparator)dotnet-build3.Tests$(PathSeparator)dotnet-build3.Tests.csproj" />
-
+
-
+
-
diff --git a/build_projects/dotnet-cli-build/DotNetRestore.cs b/build_projects/dotnet-cli-build/DotNetRestore.cs
index 9b86678d9..522c41f27 100644
--- a/build_projects/dotnet-cli-build/DotNetRestore.cs
+++ b/build_projects/dotnet-cli-build/DotNetRestore.cs
@@ -12,10 +12,10 @@ namespace Microsoft.DotNet.Cli.Build
protected override string Args
{
- get { return $"{Root} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()}"; }
+ get { return $"{GetProjectPath()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()}"; }
}
- public string Root { get; set; }
+ public string ProjectPath { get; set; }
public string Source { get; set; }
@@ -43,6 +43,16 @@ namespace Microsoft.DotNet.Cli.Build
return null;
}
+ private string GetProjectPath()
+ {
+ if (!string.IsNullOrEmpty(ProjectPath))
+ {
+ return $"{ProjectPath}";
+ }
+
+ return null;
+ }
+
private string GetSkipInvalidConfigurations()
{
if (SkipInvalidConfigurations)
diff --git a/build_projects/dotnet-cli-build/DotNetTest.cs b/build_projects/dotnet-cli-build/DotNetTest.cs
index 1e771d031..c11ca4494 100644
--- a/build_projects/dotnet-cli-build/DotNetTest.cs
+++ b/build_projects/dotnet-cli-build/DotNetTest.cs
@@ -12,14 +12,14 @@ namespace Microsoft.DotNet.Cli.Build
protected override string Args
{
- get { return $"{GetConfiguration()} {GetNoBuild()} {GetXml()} {GetNoTrait()}"; }
+ get { return $"{GetProjectPath()} {GetConfiguration()} {GetLogger()} {GetNoBuild()}"; }
}
public string Configuration { get; set; }
- public string Xml { get; set; }
+ public string Logger { get; set; }
- public string NoTrait { get; set; }
+ public string ProjectPath { get; set; }
public bool NoBuild { get; set; }
@@ -33,31 +33,31 @@ namespace Microsoft.DotNet.Cli.Build
return null;
}
- private string GetNoTrait()
+ private string GetLogger()
{
- if (!string.IsNullOrEmpty(Configuration))
+ if (!string.IsNullOrEmpty(Logger))
{
- return $"-notrait {NoTrait}";
+ return $"--logger:{Logger}";
}
return null;
}
- private string GetXml()
+ private string GetProjectPath()
{
- if (!string.IsNullOrEmpty(Xml))
+ if (!string.IsNullOrEmpty(ProjectPath))
{
- return $"-xml {Xml}";
+ return $"{ProjectPath}";
}
return null;
}
-
+
private string GetNoBuild()
{
if (NoBuild)
{
- return "--no-build";
+ return "--noBuild";
}
return null;
diff --git a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/MSBuildProject.cs b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/MSBuildProject.cs
index 7226d5db7..a653821f6 100644
--- a/src/Microsoft.DotNet.Cli.Utils/CommandResolution/MSBuildProject.cs
+++ b/src/Microsoft.DotNet.Cli.Utils/CommandResolution/MSBuildProject.cs
@@ -135,7 +135,7 @@ namespace Microsoft.DotNet.Cli.Utils
.AllEvaluatedProperties
.Where(p => p.Name.Equals("ProjectAssetsFile"))
.Select(p => p.EvaluatedValue)
- .FirstOrDefault(p => File.Exists(p));
+ .FirstOrDefault(p => Path.IsPathRooted(p) && File.Exists(p));
}
private string GetLockFilePathFromIntermediateBaseOutputPath()
diff --git a/test/ArgumentForwardingTests/ArgumentForwardingTests.cs b/test/ArgumentForwardingTests/ArgumentForwardingTests.cs
index 31b7d775c..ff74d9813 100644
--- a/test/ArgumentForwardingTests/ArgumentForwardingTests.cs
+++ b/test/ArgumentForwardingTests/ArgumentForwardingTests.cs
@@ -9,7 +9,6 @@ using System.Runtime.InteropServices;
using System.Text;
using Xunit;
using Microsoft.DotNet.Cli.Utils;
-using Microsoft.DotNet.ProjectModel;
using Microsoft.DotNet.Tools.Test.Utilities;
using System.Diagnostics;
using FluentAssertions;
@@ -24,13 +23,12 @@ namespace Microsoft.DotNet.Tests.ArgumentForwarding
private string ReflectorPath { get; set; }
private string ReflectorCmdPath { get; set; }
- public static void Main()
- {
- Console.WriteLine("Dummy Entrypoint.");
- }
-
public ArgumentForwardingTests()
{
+ Environment.SetEnvironmentVariable(
+ Constants.MSBUILD_EXE_PATH,
+ Path.Combine(new RepoDirectoriesProvider().Stage2Sdk, "MSBuild.dll"));
+
// This test has a dependency on an argument reflector
// Make sure it's been binplaced properly
FindAndEnsureReflectorPresent();
diff --git a/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj
new file mode 100644
index 000000000..1af3fdabd
--- /dev/null
+++ b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj
@@ -0,0 +1,68 @@
+
+
+
+
+ netcoreapp1.0
+ ArgumentForwardingTests
+ Exe
+ $(PackageTargetFallback);dotnet5.4;portable-net451+win8
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+
+
+
+ true
+
+
+
+
+
+ 1.0.0-alpha-20161104-2
+ All
+
+
+ 15.0.0-preview-20161024-02
+
+
+ 2.2.0-beta4-build1194
+
+
+ 1.0.1
+
+
+ 4.1.1
+
+
+ 2.2.0-beta4-build3444
+
+
+ 1.0.1-beta-000933
+
+
+
+
+ $(DefineConstants);RELEASE
+
+
+
+
+
+
+
+
diff --git a/test/ArgumentsReflector/ArgumentsReflector.csproj b/test/ArgumentsReflector/ArgumentsReflector.csproj
new file mode 100644
index 000000000..1f6cc77a2
--- /dev/null
+++ b/test/ArgumentsReflector/ArgumentsReflector.csproj
@@ -0,0 +1,35 @@
+
+
+
+
+ netcoreapp1.0
+ ArgumentsReflector
+ Exe
+
+
+
+
+
+
+
+ PreserveNewest
+ PreserveNewest
+
+
+
+
+
+ 1.0.0-alpha-20161104-2
+ All
+
+
+ 1.0.1
+
+
+
+
+ $(DefineConstants);RELEASE
+
+
+
+
diff --git a/test/EndToEnd/EndToEnd.csproj b/test/EndToEnd/EndToEnd.csproj
new file mode 100644
index 000000000..4519a700b
--- /dev/null
+++ b/test/EndToEnd/EndToEnd.csproj
@@ -0,0 +1,71 @@
+
+
+
+
+ netcoreapp1.0
+ EndToEnd
+ Exe
+ $(PackageTargetFallback);dotnet5.4;portable-net451+win8
+
+
+
+
+
+
+
+ .version
+ PreserveNewest
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+
+
+
+ true
+
+
+
+
+
+ 1.0.0-alpha-20161104-2
+ All
+
+
+ 15.0.0-preview-20161024-02
+
+
+ 2.2.0-beta4-build1194
+
+
+ 1.0.1
+
+
+ 4.1.1
+
+
+ 2.2.0-beta4-build3444
+
+
+ 1.0.0-prerelease-00206
+
+
+ 1.0.1-beta-000933
+
+
+
+
+ $(DefineConstants);RELEASE
+
+
+
+
diff --git a/test/EndToEnd/GivenDotNetUsesMSBuild.cs b/test/EndToEnd/GivenDotNetUsesMSBuild.cs
index 644eca22d..ea35b68b3 100644
--- a/test/EndToEnd/GivenDotNetUsesMSBuild.cs
+++ b/test/EndToEnd/GivenDotNetUsesMSBuild.cs
@@ -10,10 +10,6 @@ namespace Microsoft.DotNet.Tests.EndToEnd
{
public class GivenDotNetUsesMSBuild : TestBase
{
- public static void Main()
- {
- }
-
[Fact]
public void ItCanNewRestoreBuildRunCleanMSBuildProject()
{
diff --git a/test/HackUntilWeGetXUnitXmlLogger/hack-get-ci-to-pass-testResults.xml b/test/HackUntilWeGetXUnitXmlLogger/hack-get-ci-to-pass-testResults.xml
new file mode 100644
index 000000000..87016e450
--- /dev/null
+++ b/test/HackUntilWeGetXUnitXmlLogger/hack-get-ci-to-pass-testResults.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj b/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj
new file mode 100644
index 000000000..3ea5a3e8d
--- /dev/null
+++ b/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj
@@ -0,0 +1,54 @@
+
+
+
+
+ net46
+ true
+ Microsoft.DotNet.Cli.Msi.Tests
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+
+
+
+
+
+
+
+
+
+
+ 1.0.0-alpha-20161104-2
+ All
+
+
+ 1.6.0
+
+
+ 2.2.0-beta4-build3444
+
+
+ 2.1.0
+
+
+ 1.0.0
+
+
+
+
+
+
+
+
+
+
+ $(DefineConstants);RELEASE
+
+
+
+
diff --git a/test/Kestrel.Tests/DotnetTest.cs b/test/Kestrel.Tests/DotnetTest.cs
index cb637d4e8..4953e89fa 100644
--- a/test/Kestrel.Tests/DotnetTest.cs
+++ b/test/Kestrel.Tests/DotnetTest.cs
@@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using Microsoft.DotNet.ProjectModel;
using Microsoft.DotNet.TestFramework;
using Microsoft.DotNet.Tools.Test.Utilities;
using Xunit;
diff --git a/test/Kestrel.Tests/Kestrel.Tests.csproj b/test/Kestrel.Tests/Kestrel.Tests.csproj
new file mode 100644
index 000000000..9b1578065
--- /dev/null
+++ b/test/Kestrel.Tests/Kestrel.Tests.csproj
@@ -0,0 +1,61 @@
+
+
+
+
+ netcoreapp1.0
+ true
+ Kestrel.Tests
+ $(PackageTargetFallback);dotnet5.4;portable-net451+win8
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+
+
+
+ true
+
+
+
+
+
+ 1.0.0-alpha-20161104-2
+ All
+
+
+ 15.0.0-preview-20161024-02
+
+
+ 2.2.0-beta4-build1194
+
+
+ 1.0.1
+
+
+ 4.1.1
+
+
+ 2.2.0-beta4-build3444
+
+
+
+
+ $(DefineConstants);RELEASE
+
+
+
+
diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependenciesCommandFactory.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependenciesCommandFactory.cs
index 444d04a66..ba8194a21 100644
--- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependenciesCommandFactory.cs
+++ b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependenciesCommandFactory.cs
@@ -4,7 +4,6 @@
using System;
using System.IO;
using FluentAssertions;
-using Microsoft.DotNet.ProjectModel;
using Microsoft.DotNet.TestFramework;
using Microsoft.DotNet.Tools.Test.Utilities;
using NuGet.Frameworks;
diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependencyCommandResolver.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependencyCommandResolver.cs
index 9453db0f3..cd0d47d4a 100644
--- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependencyCommandResolver.cs
+++ b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependencyCommandResolver.cs
@@ -7,7 +7,6 @@ using FluentAssertions;
using Microsoft.DotNet.Cli;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.InternalAbstractions;
-using Microsoft.DotNet.ProjectModel;
using Microsoft.DotNet.TestFramework;
using Microsoft.DotNet.Tools.Test.Utilities;
using NuGet.Frameworks;
diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
new file mode 100644
index 000000000..9f584d358
--- /dev/null
+++ b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
@@ -0,0 +1,98 @@
+
+
+
+
+ netcoreapp1.0
+ Microsoft.DotNet.Cli.Utils.Tests
+ Exe
+ ../../tools/Key.snk
+ true
+ true
+ $(PackageTargetFallback);netstandardapp1.5;dotnet5.4;portable-net451+win8
+
+
+
+
+
+
+
+
+ .version
+ PreserveNewest
+
+
+ TestAssets/TestProjects/AppWithToolDependency/%(RecursiveDir)%(Filename)%(Extension)
+ PreserveNewest
+ PreserveNewest
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+
+
+
+ true
+
+
+
+
+
+ 1.0.0-alpha-20161104-2
+ All
+
+
+ 15.0.0-preview-20161024-02
+
+
+ 2.2.0-beta4-build1194
+
+
+ 1.0.1
+
+
+ 4.0.0
+
+
+ 4.1.1
+
+
+ 4.0.0-rc-2048
+
+
+ 4.0.0-rc-2048
+
+
+ 4.0.0-rc-2048
+
+
+ 4.0.0-rc-2048
+
+
+ 4.4.0-beta8
+
+
+ 2.2.0-beta4-build3444
+
+
+ 1.0.1-beta-000933
+
+
+ 15.1.0-preview-000370-00
+
+
+
+
+ $(DefineConstants);RELEASE
+
+
+
+
diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs
index 61ed42222..1267c8d39 100644
--- a/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs
+++ b/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs
@@ -15,11 +15,6 @@ namespace StreamForwarderTests
{
private static readonly string s_rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
- public static void Main()
- {
- Console.WriteLine("Dummy Entrypoint");
- }
-
public static IEnumerable