From 83d78129dbee5517d84d9aa1ff83ebde235f3379 Mon Sep 17 00:00:00 2001 From: Bryan Thornbury Date: Tue, 12 Apr 2016 17:29:07 -0700 Subject: [PATCH] t Convert Test Assets to Microsoft.NETCore.App fix dotnet-compile-fsc failures fix test failures --- .../StandaloneAppCrossPublish/Program.cs | 12 -- .../StandaloneAppCrossPublish/project.json | 35 ------ .../project.json | 2 +- .../src/BrokenProjectPathSample/project.json | 6 +- .../src/EmptyConsoleApp/project.json | 5 +- .../src/FailReleaseProject/project.json | 4 +- .../IncompatiblePackageSample/project.json | 6 +- .../src/Project1/project.json | 4 +- .../project.json | 4 +- .../project.json | 2 +- .../dotnet-desktop-and-portable/Program.cs | 4 +- .../dotnet-desktop-and-portable/project.json | 6 +- .../dotnet-hello/v1/dotnet-hello/project.json | 6 +- .../dotnet-hello/v2/dotnet-hello/project.json | 6 +- .../TestPackages/dotnet-portable/project.json | 6 +- .../AppWithBomGlobalJson/project.json | 6 +- .../project.json | 8 +- .../AppWithDirectDependency/project.json | 8 +- .../AppWithOutputAssemblyName/project.json | 6 +- .../AppWithToolDependency/project.json | 6 +- .../TestProjects/CompileFail/project.json | 6 +- .../DependencyContextFromTool/project.json | 4 +- .../DependencyContextValidator/Validator.cs | 2 +- .../DependencyContextValidator/project.json | 2 +- .../TestApp/project.json | 6 +- .../TestAppDeps/project.json | 6 +- .../TestAppPortable/project.json | 4 +- .../TestAppPortableDeps/project.json | 4 +- .../CompileFailApp/project.json | 4 +- .../FSharpTestProjects/TestApp/project.json | 4 +- .../TestAppWithArgs/project.json | 4 +- .../TestLibrary/project.json | 2 +- .../KestrelPortable/project.json | 4 +- .../KestrelStandalone/project.json | 2 +- .../.noautobuild | 0 .../project.json | 4 +- .../OutputStandardOutputAndError/project.json | 6 +- .../PortableTests/PortableApp/project.json | 6 +- .../project.json | 6 +- .../project.json | 9 +- .../PortableAppWithNative/project.json | 9 +- .../PortableTests/StandaloneApp/project.json | 8 +- .../GivenThatIWantSomeFakeTests.cs | 0 .../ProjectWithTests/project.json | 0 .../TestAppMultiTarget/project.json | 3 +- .../TestApp/project.json | 6 +- .../TestLibrary/.noautobuild | 0 .../TestLibrary/project.json | 4 +- .../TestProjects/TestAppWithArgs/project.json | 6 +- .../TestAppWithContentPackage/project.json | 6 +- .../TestAppWithContents/project.json | 6 +- .../TestAppWithLibrary/TestApp/project.json | 6 +- .../TestLibrary/.noautobuild | 0 .../TestLibrary/project.json | 4 +- .../TestAppWithScripts/project.json | 6 +- .../TestApp/project.json | 6 +- .../TestLibrary/project.json | 4 +- .../TestLibrary2/project.json | 4 +- .../TestLibraryWithAppDependency/project.json | 4 +- .../TestApp/project.json | 6 +- .../TestLibrary/project.json | 3 +- .../TestLibraryGreater/.noautobuild | 0 .../TestLibraryGreater/project.json | 12 +- .../TestLibraryLesser/.noautobuild | 0 .../TestLibraryLesser/project.json | 14 +-- .../TestLibraryWithAnalyzer/.noautobuild | 0 .../TestLibraryWithAnalyzer/project.json | 4 +- .../TestLibraryWithConfiguration/.noautobuild | 0 .../TestLibraryWithConfiguration/project.json | 4 +- .../.noautobuild | 0 .../project.json | 3 +- .../TestMicrosoftCSharpReference/project.json | 4 +- .../TestMscorlibReference/project.json | 4 +- .../src/L0/project.json | 6 +- .../src/L11/.noautobuild | 0 .../src/L11/project.json | 4 +- .../src/L12/.noautobuild | 0 .../src/L12/project.json | 4 +- .../src/L21/.noautobuild | 0 .../src/L21/project.json | 4 +- .../src/L22/.noautobuild | 0 .../src/L22/project.json | 4 +- .../project.json | 6 +- .../TestProjectWithResource/project.json | 6 +- .../TestSimpleIncrementalApp/project.json | 6 +- .../TestSystemCoreReference/project.json | 4 +- .../TestSystemReference/project.json | 4 +- scripts/dotnet-cli-build/CompileTargets.cs | 103 +++++++++++++++++- scripts/dotnet-cli-build/TestTargets.cs | 52 +++------ .../dotnet-cli-build/Utils/BuildVersion.cs | 1 + scripts/dotnet-cli-build/Utils/Dirs.cs | 1 + src/dotnet-compile-fsc/Program.cs | 1 + src/dotnet-compile-fsc/project.json | 2 +- .../commands/dotnet-publish/PublishCommand.cs | 2 +- test/Kestrel.Tests/DotnetBuildTest.cs | 4 +- .../GivenAProjectDependencyCommandResolver.cs | 24 ++-- .../StreamForwarderTests.cs | 2 +- .../PackageDependencyProviderTests.cs | 4 +- .../Assertions/CommandResultAssertions.cs | 8 +- .../Commands/PublishCommand.cs | 1 + .../TestBase.cs | 3 +- .../DependencyContextJsonReaderTest.cs | 30 ++--- .../FunctionalTests.cs | 12 +- .../ScriptExecutorTests.cs | 2 +- test/dotnet-build.Tests/BuildOutputTests.cs | 18 +-- test/dotnet-build.Tests/BuildPortableTests.cs | 26 ++--- .../BuildProjectToProjectTests.cs | 46 ++++++-- .../BuildStandAloneTests.cs | 2 +- .../dotnet-build.Tests/IncrementalTestBase.cs | 9 +- test/dotnet-build.Tests/IncrementalTests.cs | 29 +++-- ...crementalTestsOnCultureSpecificResource.cs | 4 +- .../IncrementalTestsOnResources.cs | 4 +- .../IncrementalTestsTransitiveRuntime.cs | 16 +-- test/dotnet-compile.Tests/CompilerTests.cs | 8 +- .../GivenACompilationDriver.cs | 2 +- ...boutScriptVariablesFromAManagedCompiler.cs | 15 +-- test/dotnet-pack.Tests/PackTests.cs | 18 +-- .../DthTests.cs | 2 +- test/dotnet-publish.Tests/PublishTests.cs | 98 +++++++++++------ .../GivenThatWeWantToRunTestsInTheConsole.cs | 3 +- ...hatWeWantToUseDotnetTestE2EInDesignTime.cs | 3 +- .../GivenATestCommand.cs | 1 + ...ThatWeWantToParseArgumentsForDotnetTest.cs | 4 +- test/dotnet-test.UnitTests/project.json | 2 +- test/dotnet.Tests/PackagedCommandTests.cs | 2 +- 125 files changed, 483 insertions(+), 492 deletions(-) delete mode 100644 TestAssets/CrossPublishTestProjects/StandaloneAppCrossPublish/Program.cs rename TestAssets/{CrossPublishTestProjects/StandaloneAppCrossPublish => TestProjects/LibraryWithOutputAssemblyName}/.noautobuild (100%) rename TestAssets/{ => TestProjects}/ProjectWithTests/GivenThatIWantSomeFakeTests.cs (100%) rename TestAssets/{ => TestProjects}/ProjectWithTests/project.json (100%) create mode 100644 TestAssets/TestProjects/TestAppCompilationContext/TestLibrary/.noautobuild create mode 100644 TestAssets/TestProjects/TestAppWithLibrary/TestLibrary/.noautobuild create mode 100644 TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryGreater/.noautobuild create mode 100644 TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryLesser/.noautobuild create mode 100644 TestAssets/TestProjects/TestLibraryWithAnalyzer/.noautobuild create mode 100644 TestAssets/TestProjects/TestLibraryWithConfiguration/.noautobuild create mode 100644 TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/.noautobuild create mode 100644 TestAssets/TestProjects/TestProjectToProjectDependencies/src/L11/.noautobuild create mode 100644 TestAssets/TestProjects/TestProjectToProjectDependencies/src/L12/.noautobuild create mode 100644 TestAssets/TestProjects/TestProjectToProjectDependencies/src/L21/.noautobuild create mode 100644 TestAssets/TestProjects/TestProjectToProjectDependencies/src/L22/.noautobuild diff --git a/TestAssets/CrossPublishTestProjects/StandaloneAppCrossPublish/Program.cs b/TestAssets/CrossPublishTestProjects/StandaloneAppCrossPublish/Program.cs deleted file mode 100644 index 529893b0e..000000000 --- a/TestAssets/CrossPublishTestProjects/StandaloneAppCrossPublish/Program.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace StandaloneApp -{ - public static class Program - { - public static void Main(string[] args) - { - Console.WriteLine("Hello, World!"); - } - } -} diff --git a/TestAssets/CrossPublishTestProjects/StandaloneAppCrossPublish/project.json b/TestAssets/CrossPublishTestProjects/StandaloneAppCrossPublish/project.json index 63c3de717..e69de29bb 100644 --- a/TestAssets/CrossPublishTestProjects/StandaloneAppCrossPublish/project.json +++ b/TestAssets/CrossPublishTestProjects/StandaloneAppCrossPublish/project.json @@ -1,35 +0,0 @@ -{ - "compilationOptions": { - "emitEntryPoint": true - }, - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dnxcore50", - "portable-net45+win8" - ], - "dependencies": { - "Microsoft.NETCore.App": "1.0.0-rc2-*" - } - } - }, - "runtimes": { - "win7-x64": {}, - "win7-x86": {}, - "osx.10.10-x64": {}, - "osx.10.11-x64": {}, - "ubuntu.14.04-x64": {}, - "centos.7-x64": {}, - "rhel.7.2-x64": {}, - "debian.8-x64": {} - }, - - "runtimeOptions": { - "somethingString": "anything", - "somethingBoolean": true, - "someArray": ["one", "two"], - "someObject": { - "someProperty": "someValue" - } - } -} diff --git a/TestAssets/DesktopTestProjects/AppWithDirectDependencyDesktopAndPortable/project.json b/TestAssets/DesktopTestProjects/AppWithDirectDependencyDesktopAndPortable/project.json index 5e054c559..10fa49a2e 100644 --- a/TestAssets/DesktopTestProjects/AppWithDirectDependencyDesktopAndPortable/project.json +++ b/TestAssets/DesktopTestProjects/AppWithDirectDependencyDesktopAndPortable/project.json @@ -7,7 +7,7 @@ "dotnet-desktop-and-portable": "1.0.0-*" }, "frameworks": { - "netstandard1.5": { + "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", diff --git a/TestAssets/ProjectModelServer/DthTestProjects/src/BrokenProjectPathSample/project.json b/TestAssets/ProjectModelServer/DthTestProjects/src/BrokenProjectPathSample/project.json index 5ffaa0af4..e666cf893 100644 --- a/TestAssets/ProjectModelServer/DthTestProjects/src/BrokenProjectPathSample/project.json +++ b/TestAssets/ProjectModelServer/DthTestProjects/src/BrokenProjectPathSample/project.json @@ -1,11 +1,9 @@ { "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018", + "Microsoft.NETCore.App": "1.0.0-rc2-*", "EmptyLibrary": "1.0.0-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/ProjectModelServer/DthTestProjects/src/EmptyConsoleApp/project.json b/TestAssets/ProjectModelServer/DthTestProjects/src/EmptyConsoleApp/project.json index 282dfb520..900e25c8a 100644 --- a/TestAssets/ProjectModelServer/DthTestProjects/src/EmptyConsoleApp/project.json +++ b/TestAssets/ProjectModelServer/DthTestProjects/src/EmptyConsoleApp/project.json @@ -1,10 +1,9 @@ { "dependencies": {}, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50", + "netcoreapp1.0": { "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" } }, "dnx451": {} diff --git a/TestAssets/ProjectModelServer/DthTestProjects/src/FailReleaseProject/project.json b/TestAssets/ProjectModelServer/DthTestProjects/src/FailReleaseProject/project.json index 62a1a8a2f..f6fd1813e 100644 --- a/TestAssets/ProjectModelServer/DthTestProjects/src/FailReleaseProject/project.json +++ b/TestAssets/ProjectModelServer/DthTestProjects/src/FailReleaseProject/project.json @@ -1,9 +1,9 @@ { "frameworks": { - "netstandardapp1.5": { + "netcoreapp1.0": { "imports": "dnxcore50", "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" } } }, diff --git a/TestAssets/ProjectModelServer/DthTestProjects/src/IncompatiblePackageSample/project.json b/TestAssets/ProjectModelServer/DthTestProjects/src/IncompatiblePackageSample/project.json index 229ceef01..95fc943bf 100644 --- a/TestAssets/ProjectModelServer/DthTestProjects/src/IncompatiblePackageSample/project.json +++ b/TestAssets/ProjectModelServer/DthTestProjects/src/IncompatiblePackageSample/project.json @@ -1,11 +1,9 @@ { "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018", + "Microsoft.NETCore.App": "1.0.0-rc2-*", "Microsoft.Web.Administration": "7.0.0" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/ProjectModelServer/IncorrectGlobalJson/src/Project1/project.json b/TestAssets/ProjectModelServer/IncorrectGlobalJson/src/Project1/project.json index 82dc75fe0..41d566ab9 100755 --- a/TestAssets/ProjectModelServer/IncorrectGlobalJson/src/Project1/project.json +++ b/TestAssets/ProjectModelServer/IncorrectGlobalJson/src/Project1/project.json @@ -4,9 +4,9 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "dnxcore50": {} + "netcoreapp1.0": {} } } diff --git a/TestAssets/TestPackages/dotnet-dependency-context-test/project.json b/TestAssets/TestPackages/dotnet-dependency-context-test/project.json index 1658bfdee..0af291bb9 100644 --- a/TestAssets/TestPackages/dotnet-dependency-context-test/project.json +++ b/TestAssets/TestPackages/dotnet-dependency-context-test/project.json @@ -6,12 +6,12 @@ "dependencies": { "Microsoft.NETCore.App": { "type": "platform", - "version": "1.0.0-rc2-24008" + "version": "1.0.0-rc2-*" }, "Microsoft.Extensions.DependencyModel": "1.0.0-*" }, "frameworks": { - "netstandard1.5": { + "netcoreapp1.0": { "imports": [ "dnxcore50", "portable-net45+win8" diff --git a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/project.json b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/project.json index b18b1272f..5d0e1c94d 100644 --- a/TestAssets/TestPackages/dotnet-dependency-tool-invoker/project.json +++ b/TestAssets/TestPackages/dotnet-dependency-tool-invoker/project.json @@ -18,7 +18,7 @@ "System.CommandLine": "0.1.0-e160323-1" }, "frameworks": { - "netstandard1.5": { + "netcoreapp1.0": { "imports": [ "portable-net45+win8", "dnxcore50" diff --git a/TestAssets/TestPackages/dotnet-desktop-and-portable/Program.cs b/TestAssets/TestPackages/dotnet-desktop-and-portable/Program.cs index d824a4c3a..312fb7151 100644 --- a/TestAssets/TestPackages/dotnet-desktop-and-portable/Program.cs +++ b/TestAssets/TestPackages/dotnet-desktop-and-portable/Program.cs @@ -9,8 +9,8 @@ namespace ConsoleApplication { #if NET451 Console.WriteLine($"Hello {string.Join(" ", args)} From .NETFramework,Version=v4.5.1"); -#elif NETSTANDARD1_5 - Console.WriteLine($"Hello {string.Join(" ", args)} From .NETStandardApp,Version=v1.5"); +#elif NETCOREAPP1_0 + Console.WriteLine($"Hello {string.Join(" ", args)} From .NETCoreApp,Version=v1.0"); #endif var currentAssemblyPath = typeof(ConsoleApplication.Program).GetTypeInfo().Assembly.Location; Console.WriteLine($"Current Assembly Directory - {currentAssemblyPath}"); diff --git a/TestAssets/TestPackages/dotnet-desktop-and-portable/project.json b/TestAssets/TestPackages/dotnet-desktop-and-portable/project.json index a5c7723d7..0aacc6801 100644 --- a/TestAssets/TestPackages/dotnet-desktop-and-portable/project.json +++ b/TestAssets/TestPackages/dotnet-desktop-and-portable/project.json @@ -4,17 +4,13 @@ "emitEntryPoint": true }, "frameworks": { - "netstandard1.5": { + "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0-rc2-*" } }, - "imports": [ - "portable-net45+win8", - "dnxcore50" - ] }, "net451": {} } diff --git a/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/project.json b/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/project.json index f3812c775..28dea989d 100644 --- a/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/project.json +++ b/TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/project.json @@ -4,11 +4,9 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/project.json b/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/project.json index a90a6ff79..851aed61f 100644 --- a/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/project.json +++ b/TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/project.json @@ -4,11 +4,9 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestPackages/dotnet-portable/project.json b/TestAssets/TestPackages/dotnet-portable/project.json index 7e7295a2e..3c51db895 100644 --- a/TestAssets/TestPackages/dotnet-portable/project.json +++ b/TestAssets/TestPackages/dotnet-portable/project.json @@ -4,11 +4,7 @@ "emitEntryPoint": true }, "frameworks": { - "netstandard1.5": { - "imports": [ - "dnxcore50", - "portable-net45+win8" - ], + "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", diff --git a/TestAssets/TestProjects/AppWithBomGlobalJson/project.json b/TestAssets/TestProjects/AppWithBomGlobalJson/project.json index 0cebaa507..ffe8b18b1 100644 --- a/TestAssets/TestProjects/AppWithBomGlobalJson/project.json +++ b/TestAssets/TestProjects/AppWithBomGlobalJson/project.json @@ -4,12 +4,10 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } }, "tools": { "dotnet-portable": { diff --git a/TestAssets/TestProjects/AppWithDirectAndToolDependency/project.json b/TestAssets/TestProjects/AppWithDirectAndToolDependency/project.json index a8cd385ad..db3d0e114 100644 --- a/TestAssets/TestProjects/AppWithDirectAndToolDependency/project.json +++ b/TestAssets/TestProjects/AppWithDirectAndToolDependency/project.json @@ -4,18 +4,16 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018", + "Microsoft.NETCore.App": "1.0.0-rc2-*", "dotnet-hello": { "version": "1.0.0", "target": "package" } }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } }, - "testRunner": "must-be-specified-to-generate-deps", + "tools": { "dotnet-portable": { "version": "1.0.0", diff --git a/TestAssets/TestProjects/AppWithDirectDependency/project.json b/TestAssets/TestProjects/AppWithDirectDependency/project.json index c3bdd31d6..64f34d662 100644 --- a/TestAssets/TestProjects/AppWithDirectDependency/project.json +++ b/TestAssets/TestProjects/AppWithDirectDependency/project.json @@ -3,17 +3,15 @@ "compilationOptions": { "emitEntryPoint": true }, - "testRunner": "must-be-specified-to-generate-deps", + "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018", + "Microsoft.NETCore.App": "1.0.0-rc2-*", "dotnet-hello": { "version": "1.0.0", "target": "package" } }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/AppWithOutputAssemblyName/project.json b/TestAssets/TestProjects/AppWithOutputAssemblyName/project.json index f685e1742..46d388e27 100644 --- a/TestAssets/TestProjects/AppWithOutputAssemblyName/project.json +++ b/TestAssets/TestProjects/AppWithOutputAssemblyName/project.json @@ -5,11 +5,9 @@ "preserveCompilationContext": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/AppWithToolDependency/project.json b/TestAssets/TestProjects/AppWithToolDependency/project.json index 0cebaa507..ffe8b18b1 100644 --- a/TestAssets/TestProjects/AppWithToolDependency/project.json +++ b/TestAssets/TestProjects/AppWithToolDependency/project.json @@ -4,12 +4,10 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } }, "tools": { "dotnet-portable": { diff --git a/TestAssets/TestProjects/CompileFail/project.json b/TestAssets/TestProjects/CompileFail/project.json index 2db8e45bc..569c21461 100644 --- a/TestAssets/TestProjects/CompileFail/project.json +++ b/TestAssets/TestProjects/CompileFail/project.json @@ -4,11 +4,9 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/DependencyContextFromTool/project.json b/TestAssets/TestProjects/DependencyContextFromTool/project.json index 64601e90d..39c0a414a 100644 --- a/TestAssets/TestProjects/DependencyContextFromTool/project.json +++ b/TestAssets/TestProjects/DependencyContextFromTool/project.json @@ -4,7 +4,7 @@ }, "dependencies": {}, "frameworks": { - "netstandardapp1.5": { + "netcoreapp1.0": { "imports": [ "dnxcore50", "portable-net45+win8" @@ -12,7 +12,7 @@ "dependencies": { "Microsoft.NETCore.App": { "type": "platform", - "version": "1.0.0-rc2-24008" + "version": "1.0.0-rc2-*" } } } diff --git a/TestAssets/TestProjects/DependencyContextValidator/DependencyContextValidator/Validator.cs b/TestAssets/TestProjects/DependencyContextValidator/DependencyContextValidator/Validator.cs index b34b4c93b..67b37bac3 100644 --- a/TestAssets/TestProjects/DependencyContextValidator/DependencyContextValidator/Validator.cs +++ b/TestAssets/TestProjects/DependencyContextValidator/DependencyContextValidator/Validator.cs @@ -47,7 +47,7 @@ namespace Microsoft.Extensions.DependencyModel Console.WriteLine($"Compilation {compilationLibrary.Name}:{Path.GetFileName(resolvedPath)}"); if (!File.Exists(resolvedPath)) { - Error($"Compilataion library resolved to non existent path {resolvedPath}"); + Error($"Compilation library resolved to non existent path {resolvedPath}"); } } } diff --git a/TestAssets/TestProjects/DependencyContextValidator/DependencyContextValidator/project.json b/TestAssets/TestProjects/DependencyContextValidator/DependencyContextValidator/project.json index 33323dfcd..556470522 100644 --- a/TestAssets/TestProjects/DependencyContextValidator/DependencyContextValidator/project.json +++ b/TestAssets/TestProjects/DependencyContextValidator/DependencyContextValidator/project.json @@ -10,7 +10,7 @@ "netstandard1.5": { "imports": "dnxcore50", "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" } }, "net451": {} diff --git a/TestAssets/TestProjects/DependencyContextValidator/TestApp/project.json b/TestAssets/TestProjects/DependencyContextValidator/TestApp/project.json index 2c0ba29e1..c047bfd8a 100644 --- a/TestAssets/TestProjects/DependencyContextValidator/TestApp/project.json +++ b/TestAssets/TestProjects/DependencyContextValidator/TestApp/project.json @@ -5,12 +5,10 @@ "preserveCompilationContext": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018", + "Microsoft.NETCore.App": "1.0.0-rc2-*", "DependencyContextValidator": "1.0.0-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { "imports": ["dnxcore50", "portable-net45+win8"] } } } diff --git a/TestAssets/TestProjects/DependencyContextValidator/TestAppDeps/project.json b/TestAssets/TestProjects/DependencyContextValidator/TestAppDeps/project.json index 7378d1de7..32752a8ff 100644 --- a/TestAssets/TestProjects/DependencyContextValidator/TestAppDeps/project.json +++ b/TestAssets/TestProjects/DependencyContextValidator/TestAppDeps/project.json @@ -4,12 +4,10 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018", + "Microsoft.NETCore.App": "1.0.0-rc2-*", "DependencyContextValidator": "1.0.0-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { "imports": ["dnxcore50", "portable-net45+win8"] } } } diff --git a/TestAssets/TestProjects/DependencyContextValidator/TestAppPortable/project.json b/TestAssets/TestProjects/DependencyContextValidator/TestAppPortable/project.json index bcf6d06ad..defaab859 100644 --- a/TestAssets/TestProjects/DependencyContextValidator/TestAppPortable/project.json +++ b/TestAssets/TestProjects/DependencyContextValidator/TestAppPortable/project.json @@ -12,8 +12,6 @@ "DependencyContextValidator": "1.0.0-*" }, "frameworks": { - "netstandard1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { "imports": ["dnxcore50", "portable-net45+win8"] } } } diff --git a/TestAssets/TestProjects/DependencyContextValidator/TestAppPortableDeps/project.json b/TestAssets/TestProjects/DependencyContextValidator/TestAppPortableDeps/project.json index 864170b2d..fc9665b69 100644 --- a/TestAssets/TestProjects/DependencyContextValidator/TestAppPortableDeps/project.json +++ b/TestAssets/TestProjects/DependencyContextValidator/TestAppPortableDeps/project.json @@ -11,8 +11,6 @@ "DependencyContextValidator": "1.0.0-*" }, "frameworks": { - "netstandard1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { "imports": ["dnxcore50", "portable-net45+win8"] } } } diff --git a/TestAssets/TestProjects/FSharpTestProjects/CompileFailApp/project.json b/TestAssets/TestProjects/FSharpTestProjects/CompileFailApp/project.json index 27655688c..084c037be 100644 --- a/TestAssets/TestProjects/FSharpTestProjects/CompileFailApp/project.json +++ b/TestAssets/TestProjects/FSharpTestProjects/CompileFailApp/project.json @@ -9,7 +9,7 @@ ], "dependencies": { "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-151221", - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "tools": { "dotnet-compile-fsc": { @@ -22,7 +22,7 @@ } }, "frameworks": { - "netstandardapp1.5": { + "netcoreapp1.0": { "imports": [ "dnxcore50", "netstandard1.3" diff --git a/TestAssets/TestProjects/FSharpTestProjects/TestApp/project.json b/TestAssets/TestProjects/FSharpTestProjects/TestApp/project.json index 37c8606f1..15c2acb0d 100644 --- a/TestAssets/TestProjects/FSharpTestProjects/TestApp/project.json +++ b/TestAssets/TestProjects/FSharpTestProjects/TestApp/project.json @@ -12,7 +12,7 @@ "version": "1.0.0-*", "target": "project" }, - "NETStandard.Library": "1.5.0-rc2-24018", + "Microsoft.NETCore.App": "1.0.0-rc2-*", "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-151221" }, "tools": { @@ -26,7 +26,7 @@ } }, "frameworks": { - "netstandardapp1.5": { + "netcoreapp1.0": { "imports": "dnxcore50" } } diff --git a/TestAssets/TestProjects/FSharpTestProjects/TestAppWithArgs/project.json b/TestAssets/TestProjects/FSharpTestProjects/TestAppWithArgs/project.json index 4a1bb8a7f..5d7736e17 100644 --- a/TestAssets/TestProjects/FSharpTestProjects/TestAppWithArgs/project.json +++ b/TestAssets/TestProjects/FSharpTestProjects/TestAppWithArgs/project.json @@ -9,7 +9,7 @@ ], "dependencies": { "Microsoft.FSharp.Core.netcore": "1.0.0-alpha-151221", - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "tools": { "dotnet-compile-fsc": { @@ -22,7 +22,7 @@ } }, "frameworks": { - "netstandardapp1.5": { + "netcoreapp1.0": { "imports": "dnxcore50" } } diff --git a/TestAssets/TestProjects/FSharpTestProjects/TestLibrary/project.json b/TestAssets/TestProjects/FSharpTestProjects/TestLibrary/project.json index 4bf555557..1129cfe83 100644 --- a/TestAssets/TestProjects/FSharpTestProjects/TestLibrary/project.json +++ b/TestAssets/TestProjects/FSharpTestProjects/TestLibrary/project.json @@ -20,7 +20,7 @@ } }, "frameworks": { - "netstandardapp1.5": { + "netcoreapp1.0": { "imports": "dnxcore50" } } diff --git a/TestAssets/TestProjects/KestrelSample/KestrelPortable/project.json b/TestAssets/TestProjects/KestrelSample/KestrelPortable/project.json index 8d5471e13..740a95b29 100644 --- a/TestAssets/TestProjects/KestrelSample/KestrelPortable/project.json +++ b/TestAssets/TestProjects/KestrelSample/KestrelPortable/project.json @@ -12,11 +12,11 @@ "../src/*.cs" ], "frameworks": { - "netstandard1.5": { + "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", - "version": "1.0.0-rc2-24008" + "version": "1.0.0-rc2-*" } }, "imports": [ diff --git a/TestAssets/TestProjects/KestrelSample/KestrelStandalone/project.json b/TestAssets/TestProjects/KestrelSample/KestrelStandalone/project.json index a74bc67c5..6a750a790 100644 --- a/TestAssets/TestProjects/KestrelSample/KestrelStandalone/project.json +++ b/TestAssets/TestProjects/KestrelSample/KestrelStandalone/project.json @@ -14,7 +14,7 @@ "frameworks": { "netcoreapp1.0": { "dependencies": { - "Microsoft.NETCore.App": "1.0.0-rc2-3002306" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "imports": [ "dnxcore50", diff --git a/TestAssets/CrossPublishTestProjects/StandaloneAppCrossPublish/.noautobuild b/TestAssets/TestProjects/LibraryWithOutputAssemblyName/.noautobuild similarity index 100% rename from TestAssets/CrossPublishTestProjects/StandaloneAppCrossPublish/.noautobuild rename to TestAssets/TestProjects/LibraryWithOutputAssemblyName/.noautobuild diff --git a/TestAssets/TestProjects/LibraryWithOutputAssemblyName/project.json b/TestAssets/TestProjects/LibraryWithOutputAssemblyName/project.json index a74e66dbd..c3941cf5e 100644 --- a/TestAssets/TestProjects/LibraryWithOutputAssemblyName/project.json +++ b/TestAssets/TestProjects/LibraryWithOutputAssemblyName/project.json @@ -6,8 +6,6 @@ "NETStandard.Library": "1.5.0-rc2-24018" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netstandard1.5": { } } } diff --git a/TestAssets/TestProjects/OutputStandardOutputAndError/project.json b/TestAssets/TestProjects/OutputStandardOutputAndError/project.json index 2db8e45bc..569c21461 100644 --- a/TestAssets/TestProjects/OutputStandardOutputAndError/project.json +++ b/TestAssets/TestProjects/OutputStandardOutputAndError/project.json @@ -4,11 +4,9 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/PortableTests/PortableApp/project.json b/TestAssets/TestProjects/PortableTests/PortableApp/project.json index 932c1708f..367478044 100644 --- a/TestAssets/TestProjects/PortableTests/PortableApp/project.json +++ b/TestAssets/TestProjects/PortableTests/PortableApp/project.json @@ -4,11 +4,7 @@ }, "dependencies": {}, "frameworks": { - "netstandard1.5": { - "imports": [ - "dnxcore50", - "portable-net45+win8" - ], + "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", diff --git a/TestAssets/TestProjects/PortableTests/PortableAppCompilationContext/project.json b/TestAssets/TestProjects/PortableTests/PortableAppCompilationContext/project.json index ce4ee1ac2..a016cf549 100644 --- a/TestAssets/TestProjects/PortableTests/PortableAppCompilationContext/project.json +++ b/TestAssets/TestProjects/PortableTests/PortableAppCompilationContext/project.json @@ -5,11 +5,7 @@ }, "dependencies": {}, "frameworks": { - "netstandard1.5": { - "imports": [ - "dnxcore50", - "portable-net45+win8" - ], + "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", diff --git a/TestAssets/TestProjects/PortableTests/PortableAppWithIntentionalManagedDowngrade/project.json b/TestAssets/TestProjects/PortableTests/PortableAppWithIntentionalManagedDowngrade/project.json index 1d7079bb6..4a4acdf37 100644 --- a/TestAssets/TestProjects/PortableTests/PortableAppWithIntentionalManagedDowngrade/project.json +++ b/TestAssets/TestProjects/PortableTests/PortableAppWithIntentionalManagedDowngrade/project.json @@ -4,18 +4,15 @@ }, "dependencies": {}, "frameworks": { - "netstandard1.5": { - "imports": [ - "dnxcore50", - "portable-net45+win8" - ], + "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0-rc2-*" }, "System.Linq": "4.0.0" - } + }, + "imports": "dnxcore50" } } } diff --git a/TestAssets/TestProjects/PortableTests/PortableAppWithNative/project.json b/TestAssets/TestProjects/PortableTests/PortableAppWithNative/project.json index ba5c3e08c..d35c4ceab 100644 --- a/TestAssets/TestProjects/PortableTests/PortableAppWithNative/project.json +++ b/TestAssets/TestProjects/PortableTests/PortableAppWithNative/project.json @@ -3,18 +3,15 @@ "emitEntryPoint": true }, "frameworks": { - "netstandard1.5": { - "imports": [ - "dnxcore50", - "portable-net45+win8" - ], + "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0-rc2-*" }, "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*" - } + }, + "imports": "dnxcore50" } } } diff --git a/TestAssets/TestProjects/PortableTests/StandaloneApp/project.json b/TestAssets/TestProjects/PortableTests/StandaloneApp/project.json index 19b31b89c..ce238f26f 100644 --- a/TestAssets/TestProjects/PortableTests/StandaloneApp/project.json +++ b/TestAssets/TestProjects/PortableTests/StandaloneApp/project.json @@ -3,13 +3,9 @@ "emitEntryPoint": true }, "frameworks": { - "netstandardapp1.5": { - "imports": [ - "dnxcore50", - "portable-net45+win8" - ], + "netcoreapp1.0": { "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" } } }, diff --git a/TestAssets/ProjectWithTests/GivenThatIWantSomeFakeTests.cs b/TestAssets/TestProjects/ProjectWithTests/GivenThatIWantSomeFakeTests.cs similarity index 100% rename from TestAssets/ProjectWithTests/GivenThatIWantSomeFakeTests.cs rename to TestAssets/TestProjects/ProjectWithTests/GivenThatIWantSomeFakeTests.cs diff --git a/TestAssets/ProjectWithTests/project.json b/TestAssets/TestProjects/ProjectWithTests/project.json similarity index 100% rename from TestAssets/ProjectWithTests/project.json rename to TestAssets/TestProjects/ProjectWithTests/project.json diff --git a/TestAssets/TestProjects/RunTestsApps/TestAppMultiTarget/project.json b/TestAssets/TestProjects/RunTestsApps/TestAppMultiTarget/project.json index 7f13bceec..6aa67b4b6 100644 --- a/TestAssets/TestProjects/RunTestsApps/TestAppMultiTarget/project.json +++ b/TestAssets/TestProjects/RunTestsApps/TestAppMultiTarget/project.json @@ -5,10 +5,9 @@ }, "frameworks": { "netcoreapp1.0": { - "imports": "dnxcore50", "dependencies": { "Microsoft.NETCore.App": { - "version": "1.0.0-rc2-24008", + "version": "1.0.0-rc2-*", "type": "platform" } } diff --git a/TestAssets/TestProjects/TestAppCompilationContext/TestApp/project.json b/TestAssets/TestProjects/TestAppCompilationContext/TestApp/project.json index 315ee875e..9df98ebf4 100644 --- a/TestAssets/TestProjects/TestAppCompilationContext/TestApp/project.json +++ b/TestAssets/TestProjects/TestAppCompilationContext/TestApp/project.json @@ -6,11 +6,9 @@ }, "dependencies": { "TestLibrary": "1.0.0-*", - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/TestAppCompilationContext/TestLibrary/.noautobuild b/TestAssets/TestProjects/TestAppCompilationContext/TestLibrary/.noautobuild new file mode 100644 index 000000000..e69de29bb diff --git a/TestAssets/TestProjects/TestAppCompilationContext/TestLibrary/project.json b/TestAssets/TestProjects/TestAppCompilationContext/TestLibrary/project.json index 5d93e8397..e13a3e770 100644 --- a/TestAssets/TestProjects/TestAppCompilationContext/TestLibrary/project.json +++ b/TestAssets/TestProjects/TestAppCompilationContext/TestLibrary/project.json @@ -13,8 +13,6 @@ "NETStandard.Library": "1.5.0-rc2-24018" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netstandard1.5": { } } } diff --git a/TestAssets/TestProjects/TestAppWithArgs/project.json b/TestAssets/TestProjects/TestAppWithArgs/project.json index 2db8e45bc..569c21461 100644 --- a/TestAssets/TestProjects/TestAppWithArgs/project.json +++ b/TestAssets/TestProjects/TestAppWithArgs/project.json @@ -4,11 +4,9 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/TestAppWithContentPackage/project.json b/TestAssets/TestProjects/TestAppWithContentPackage/project.json index 88431e2f1..94ece6443 100644 --- a/TestAssets/TestProjects/TestAppWithContentPackage/project.json +++ b/TestAssets/TestProjects/TestAppWithContentPackage/project.json @@ -5,12 +5,10 @@ "outputName": "AppWithContentPackage" }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018", + "Microsoft.NETCore.App": "1.0.0-rc2-*", "SharedContentA": "1.0.0-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { "imports": ["netstandardapp1.5", "dnxcore50"] } } } diff --git a/TestAssets/TestProjects/TestAppWithContents/project.json b/TestAssets/TestProjects/TestAppWithContents/project.json index 4204fe6ae..0b538b20e 100644 --- a/TestAssets/TestProjects/TestAppWithContents/project.json +++ b/TestAssets/TestProjects/TestAppWithContents/project.json @@ -4,12 +4,10 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "content": "testcontentfile.txt", "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/TestAppWithLibrary/TestApp/project.json b/TestAssets/TestProjects/TestAppWithLibrary/TestApp/project.json index 2db64e202..1418ae85d 100644 --- a/TestAssets/TestProjects/TestAppWithLibrary/TestApp/project.json +++ b/TestAssets/TestProjects/TestAppWithLibrary/TestApp/project.json @@ -9,11 +9,9 @@ "target": "project", "version": "1.0.0-*" }, - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/TestAppWithLibrary/TestLibrary/.noautobuild b/TestAssets/TestProjects/TestAppWithLibrary/TestLibrary/.noautobuild new file mode 100644 index 000000000..e69de29bb diff --git a/TestAssets/TestProjects/TestAppWithLibrary/TestLibrary/project.json b/TestAssets/TestProjects/TestAppWithLibrary/TestLibrary/project.json index 5d93e8397..e13a3e770 100644 --- a/TestAssets/TestProjects/TestAppWithLibrary/TestLibrary/project.json +++ b/TestAssets/TestProjects/TestAppWithLibrary/TestLibrary/project.json @@ -13,8 +13,6 @@ "NETStandard.Library": "1.5.0-rc2-24018" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netstandard1.5": { } } } diff --git a/TestAssets/TestProjects/TestAppWithScripts/project.json b/TestAssets/TestProjects/TestAppWithScripts/project.json index 15eef606d..ccc5eb02c 100644 --- a/TestAssets/TestProjects/TestAppWithScripts/project.json +++ b/TestAssets/TestProjects/TestAppWithScripts/project.json @@ -4,12 +4,10 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } }, "scripts": { "prepublish": [ diff --git a/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestApp/project.json b/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestApp/project.json index bd93ab3e8..a5c0b72ae 100644 --- a/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestApp/project.json +++ b/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestApp/project.json @@ -9,12 +9,10 @@ "target": "project", "version": "1.0.0-*" }, - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } }, "scripts": { "prepublish": [ diff --git a/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestLibrary/project.json b/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestLibrary/project.json index 5d93e8397..eb9a0ed64 100644 --- a/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestLibrary/project.json +++ b/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestLibrary/project.json @@ -13,8 +13,6 @@ "NETStandard.Library": "1.5.0-rc2-24018" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestLibrary2/project.json b/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestLibrary2/project.json index ace17f341..3b42f15ab 100644 --- a/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestLibrary2/project.json +++ b/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestLibrary2/project.json @@ -11,8 +11,6 @@ "NETStandard.Library": "1.5.0-rc2-24018" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestLibraryWithAppDependency/project.json b/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestLibraryWithAppDependency/project.json index bdafd9ac2..8cda79b57 100644 --- a/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestLibraryWithAppDependency/project.json +++ b/TestAssets/TestProjects/TestAppWithTransitiveAppDependency/TestLibraryWithAppDependency/project.json @@ -8,8 +8,6 @@ "NETStandard.Library": "1.5.0-rc2-24018" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/TestAppWithWrapperProjectDependency/TestApp/project.json b/TestAssets/TestProjects/TestAppWithWrapperProjectDependency/TestApp/project.json index 2db64e202..1418ae85d 100644 --- a/TestAssets/TestProjects/TestAppWithWrapperProjectDependency/TestApp/project.json +++ b/TestAssets/TestProjects/TestAppWithWrapperProjectDependency/TestApp/project.json @@ -9,11 +9,9 @@ "target": "project", "version": "1.0.0-*" }, - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/TestAppWithWrapperProjectDependency/TestLibrary/project.json b/TestAssets/TestProjects/TestAppWithWrapperProjectDependency/TestLibrary/project.json index 44ae2133b..6eea3e23f 100644 --- a/TestAssets/TestProjects/TestAppWithWrapperProjectDependency/TestLibrary/project.json +++ b/TestAssets/TestProjects/TestAppWithWrapperProjectDependency/TestLibrary/project.json @@ -1,7 +1,6 @@ { "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50", + "netcoreapp1.0": { "bin": { "assembly": "bin.keep\\{configuration}\\dnxcore50\\TestLibrary.dll", "pdb": "bin.keep\\{configuration}\\dnxcore50\\TestLibrary.pdb" diff --git a/TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryGreater/.noautobuild b/TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryGreater/.noautobuild new file mode 100644 index 000000000..e69de29bb diff --git a/TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryGreater/project.json b/TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryGreater/project.json index d17c5f85c..e48f957d0 100644 --- a/TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryGreater/project.json +++ b/TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryGreater/project.json @@ -1,19 +1,19 @@ { "version": "1.0.0-*", + "testRunner": "xunit", + "dependencies": { "Newtonsoft.Json": "7.0.1" }, + "frameworks": { "net451": {}, - "netstandardapp1.5": { - "imports": [ - "dnxcore50", - "portable-net45+wp80+win8" - ], + "netstandard1.5": { "dependencies": { "NETStandard.Library": "1.5.0-rc2-24018" - } + }, + "imports": "portable-net45+win8" } } } diff --git a/TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryLesser/.noautobuild b/TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryLesser/.noautobuild new file mode 100644 index 000000000..e69de29bb diff --git a/TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryLesser/project.json b/TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryLesser/project.json index 84addac54..f1fe53e40 100644 --- a/TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryLesser/project.json +++ b/TestAssets/TestProjects/TestBindingRedirectGeneration/TestLibraryLesser/project.json @@ -1,22 +1,22 @@ { "version": "1.0.0-*", + "testRunner": "xunit", + "dependencies": { - "Newtonsoft.Json": "6.0.0", + "Newtonsoft.Json": "6.0.1", "TestLibraryGreater": { "target": "project" } }, + "frameworks": { "net451": {}, - "netstandardapp1.5": { - "imports": [ - "dnxcore50", - "portable-net45+wp80+win8" - ], + "netstandard1.5": { "dependencies": { "NETStandard.Library": "1.5.0-rc2-24018" - } + }, + "imports": "portable-net45+win8" } } } diff --git a/TestAssets/TestProjects/TestLibraryWithAnalyzer/.noautobuild b/TestAssets/TestProjects/TestLibraryWithAnalyzer/.noautobuild new file mode 100644 index 000000000..e69de29bb diff --git a/TestAssets/TestProjects/TestLibraryWithAnalyzer/project.json b/TestAssets/TestProjects/TestLibraryWithAnalyzer/project.json index 679627763..758a7a29f 100644 --- a/TestAssets/TestProjects/TestLibraryWithAnalyzer/project.json +++ b/TestAssets/TestProjects/TestLibraryWithAnalyzer/project.json @@ -11,8 +11,6 @@ } }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netstandard1.5": { } } } diff --git a/TestAssets/TestProjects/TestLibraryWithConfiguration/.noautobuild b/TestAssets/TestProjects/TestLibraryWithConfiguration/.noautobuild new file mode 100644 index 000000000..e69de29bb diff --git a/TestAssets/TestProjects/TestLibraryWithConfiguration/project.json b/TestAssets/TestProjects/TestLibraryWithConfiguration/project.json index 517b85c7a..3ad347d9e 100644 --- a/TestAssets/TestProjects/TestLibraryWithConfiguration/project.json +++ b/TestAssets/TestProjects/TestLibraryWithConfiguration/project.json @@ -16,8 +16,6 @@ "Test": {} }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netstandard1.5": { } } } diff --git a/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/.noautobuild b/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/.noautobuild new file mode 100644 index 000000000..e69de29bb diff --git a/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/project.json b/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/project.json index a26cba447..fe6bff5f3 100644 --- a/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/project.json +++ b/TestAssets/TestProjects/TestLibraryWithMultipleFrameworks/project.json @@ -9,8 +9,7 @@ "net35": {}, "net40": {}, "net461": {}, - "netstandardapp1.5": { - "imports": "dnxcore50", + "netstandard1.5": { "dependencies": { "NETStandard.Library": "1.5.0-rc2-24018" } diff --git a/TestAssets/TestProjects/TestMicrosoftCSharpReference/project.json b/TestAssets/TestProjects/TestMicrosoftCSharpReference/project.json index f092e10ef..36f6e2081 100644 --- a/TestAssets/TestProjects/TestMicrosoftCSharpReference/project.json +++ b/TestAssets/TestProjects/TestMicrosoftCSharpReference/project.json @@ -2,10 +2,10 @@ "version": "1.0.0", "dependencies": {}, "frameworks": { - "netstandardapp1.5": { + "netcoreapp1.0": { "imports": "dnxcore50", "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" } }, "net451": { diff --git a/TestAssets/TestProjects/TestMscorlibReference/project.json b/TestAssets/TestProjects/TestMscorlibReference/project.json index 94c92e0d8..025b89742 100644 --- a/TestAssets/TestProjects/TestMscorlibReference/project.json +++ b/TestAssets/TestProjects/TestMscorlibReference/project.json @@ -2,9 +2,9 @@ "version": "1.0.0-*", "dependencies": {}, "frameworks": { - "netstandardapp1.5": { + "netcoreapp1.0": { "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" } }, "net451": { diff --git a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L0/project.json b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L0/project.json index 9991469e1..982c82356 100644 --- a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L0/project.json +++ b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L0/project.json @@ -6,11 +6,9 @@ "dependencies": { "L11": "1.0.0-*", "L12": "1.0.0-*", - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L11/.noautobuild b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L11/.noautobuild new file mode 100644 index 000000000..e69de29bb diff --git a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L11/project.json b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L11/project.json index dfd5e2b6b..c5250b5ad 100644 --- a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L11/project.json +++ b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L11/project.json @@ -3,10 +3,10 @@ "dependencies": { "L12": "1.0.0-*", "L21": "1.0.0-*", - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { + "netstandard1.5": { "imports": "dnxcore50" } } diff --git a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L12/.noautobuild b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L12/.noautobuild new file mode 100644 index 000000000..e69de29bb diff --git a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L12/project.json b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L12/project.json index dc1ab81c7..0b7b41135 100644 --- a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L12/project.json +++ b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L12/project.json @@ -2,10 +2,10 @@ "version": "1.0.0-*", "dependencies": { "L22": "1.0.0-*", - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { + "netstandard1.5": { "imports": "dnxcore50" } } diff --git a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L21/.noautobuild b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L21/.noautobuild new file mode 100644 index 000000000..e69de29bb diff --git a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L21/project.json b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L21/project.json index 749f006b8..006fb0c06 100644 --- a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L21/project.json +++ b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L21/project.json @@ -1,10 +1,10 @@ { "version": "1.0.0-*", "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { + "netstandard1.5": { "imports": "dnxcore50" } } diff --git a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L22/.noautobuild b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L22/.noautobuild new file mode 100644 index 000000000..e69de29bb diff --git a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L22/project.json b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L22/project.json index 749f006b8..006fb0c06 100644 --- a/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L22/project.json +++ b/TestAssets/TestProjects/TestProjectToProjectDependencies/src/L22/project.json @@ -1,10 +1,10 @@ { "version": "1.0.0-*", "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { + "netstandard1.5": { "imports": "dnxcore50" } } diff --git a/TestAssets/TestProjects/TestProjectWithCultureSpecificResource/project.json b/TestAssets/TestProjects/TestProjectWithCultureSpecificResource/project.json index 2db8e45bc..569c21461 100644 --- a/TestAssets/TestProjects/TestProjectWithCultureSpecificResource/project.json +++ b/TestAssets/TestProjects/TestProjectWithCultureSpecificResource/project.json @@ -4,11 +4,9 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/TestProjectWithResource/project.json b/TestAssets/TestProjects/TestProjectWithResource/project.json index 2db8e45bc..569c21461 100644 --- a/TestAssets/TestProjects/TestProjectWithResource/project.json +++ b/TestAssets/TestProjects/TestProjectWithResource/project.json @@ -4,11 +4,9 @@ "emitEntryPoint": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/TestSimpleIncrementalApp/project.json b/TestAssets/TestProjects/TestSimpleIncrementalApp/project.json index 2348dec60..fab81ce74 100644 --- a/TestAssets/TestProjects/TestSimpleIncrementalApp/project.json +++ b/TestAssets/TestProjects/TestSimpleIncrementalApp/project.json @@ -5,11 +5,9 @@ "xmlDoc": true }, "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" }, "frameworks": { - "netstandardapp1.5": { - "imports": "dnxcore50" - } + "netcoreapp1.0": { } } } diff --git a/TestAssets/TestProjects/TestSystemCoreReference/project.json b/TestAssets/TestProjects/TestSystemCoreReference/project.json index fd3d0e4c6..ee344b429 100644 --- a/TestAssets/TestProjects/TestSystemCoreReference/project.json +++ b/TestAssets/TestProjects/TestSystemCoreReference/project.json @@ -2,9 +2,9 @@ "version": "1.0.0-*", "dependencies": {}, "frameworks": { - "netstandardapp1.5": { + "netcoreapp1.0": { "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" } }, "net451": { diff --git a/TestAssets/TestProjects/TestSystemReference/project.json b/TestAssets/TestProjects/TestSystemReference/project.json index 2ab04ac7e..0f89aa233 100644 --- a/TestAssets/TestProjects/TestSystemReference/project.json +++ b/TestAssets/TestProjects/TestSystemReference/project.json @@ -2,9 +2,9 @@ "version": "1.0.0-*", "dependencies": {}, "frameworks": { - "netstandardapp1.5": { + "netcoreapp1.0": { "dependencies": { - "NETStandard.Library": "1.5.0-rc2-24018" + "Microsoft.NETCore.App": "1.0.0-rc2-*" } }, "net451": { diff --git a/scripts/dotnet-cli-build/CompileTargets.cs b/scripts/dotnet-cli-build/CompileTargets.cs index 8d22cc6de..bccb35b0f 100644 --- a/scripts/dotnet-cli-build/CompileTargets.cs +++ b/scripts/dotnet-cli-build/CompileTargets.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Text; using System.Linq; using System.Runtime.InteropServices; using Microsoft.DotNet.Cli.Build.Framework; @@ -35,6 +36,26 @@ namespace Microsoft.DotNet.Cli.Build "vbc.exe" }; + public static readonly string[] HostPackageSupportedRids = new[] + { + "win7-x64", + "win7-x86", + "osx.10.10-x64", + "osx.10.11-x64", + "ubuntu.14.04-x64", + "centos.7-x64", + "rhel.7-x64", + "rhel.7.2-x64", + "debian.8-x64" + }; + + public static readonly string[] HostPackages = new[] + { + "Microsoft.NETCore.DotNetHost", + "Microsoft.NETCore.DotNetHostPolicy", + "Microsoft.NETCore.DotNetHostResolver" + }; + public const string SharedFrameworkName = "Microsoft.NETCore.App"; public static Crossgen CrossgenUtil = new Crossgen(CoreCLRVersion); @@ -58,6 +79,33 @@ namespace Microsoft.DotNet.Cli.Build return c.Success(); } + // We need to generate stub host packages so we can restore our standalone test assets against the metapackage + // we built earlier in the build + // https://github.com/dotnet/cli/issues/2438 + [Target] + public static BuildTargetResult GenerateStubHostPackages(BuildTargetContext c) + { + string currentRid = GetRuntimeId(); + var buildVersion = c.BuildContext.Get("BuildVersion"); + + foreach (var hostPackageId in HostPackages) + { + foreach (var rid in HostPackageSupportedRids) + { + if (! rid.Equals(currentRid)) + { + CreateDummyRuntimeNuGetPackage( + DotNetCli.Stage0, + hostPackageId, + rid, + buildVersion.HostNuGetPackageVersion, + Dirs.CorehostDummyPackages); + } + } + } + return c.Success(); + } + private static string HostVer = "1.0.1"; private static string HostPolicyVer = "1.0.1"; private static string HostFxrVer = "1.0.1"; @@ -146,7 +194,7 @@ namespace Microsoft.DotNet.Cli.Build return c.Success(); } - [Target] + [Target(nameof(CompileTargets.GenerateStubHostPackages))] public static BuildTargetResult PackagePkgProjects(BuildTargetContext c) { var buildVersion = c.BuildContext.Get("BuildVersion"); @@ -158,7 +206,8 @@ namespace Microsoft.DotNet.Cli.Build var content = $@"{c.BuildContext["CommitHash"]}{Environment.NewLine}{version}{Environment.NewLine}"; var pkgDir = Path.Combine(c.BuildContext.BuildDirectory, "pkg"); File.WriteAllText(Path.Combine(pkgDir, "version.txt"), content); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + + if (CurrentPlatform.IsWindows) { Command.Create(Path.Combine(pkgDir, "pack.cmd")) // Workaround to arg escaping adding backslashes for arguments to .cmd scripts. @@ -305,6 +354,50 @@ namespace Microsoft.DotNet.Cli.Build return c.Success(); } + private static void CreateDummyRuntimeNuGetPackage(DotNetCli dotnet, string basePackageId, string rid, string version, string outputDir) + { + var packageId = $"runtime.{rid}.{basePackageId}"; + + var projectJson = new StringBuilder(); + projectJson.Append("{"); + projectJson.Append($" \"version\": \"{version}\","); + projectJson.Append($" \"name\": \"{packageId}\","); + projectJson.Append(" \"dependencies\": { \"NETStandard.Library\": \"1.5.0-rc2-24008\" },"); + projectJson.Append(" \"frameworks\": { \"netcoreapp1.0\": { \"imports\": [\"netstandard1.5\", \"dnxcore50\"] } },"); + projectJson.Append($" \"runtimes\": {{ \"{rid}\": {{ }} }},"); + projectJson.Append("}"); + + var programCs = "using System; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { Console.WriteLine(\"Hello World!\"); } } }"; + + var tempPjDirectory = Path.Combine(Dirs.Intermediate, "dummyNuGetPackageIntermediate"); + FS.Rmdir(tempPjDirectory); + + Directory.CreateDirectory(tempPjDirectory); + + var tempPjFile = Path.Combine(tempPjDirectory, "project.json"); + var tempSourceFile = Path.Combine(tempPjDirectory, "Program.cs"); + + File.WriteAllText(tempPjFile, projectJson.ToString()); + File.WriteAllText(tempSourceFile, programCs.ToString()); + + dotnet.Restore("--verbosity", "verbose", "--disable-parallel") + .WorkingDirectory(tempPjDirectory) + .Execute() + .EnsureSuccessful(); + + dotnet.Build(tempPjFile, "--runtime", rid) + .WorkingDirectory(tempPjDirectory) + .Execute() + .EnsureSuccessful(); + + dotnet.Pack( + tempPjFile, "--no-build", + "--output", outputDir) + .WorkingDirectory(tempPjDirectory) + .Execute() + .EnsureSuccessful(); + } + private static void CleanOutputDir(string directory) { foreach (var file in FilesToClean) @@ -346,7 +439,11 @@ namespace Microsoft.DotNet.Cli.Build string SharedFrameworkSourceRoot = GenerateSharedFrameworkProject(c, SharedFrameworkTemplateSourceRoot, sharedFrameworkRid); - dotnetCli.Restore("--verbosity", "verbose", "--disable-parallel", "--infer-runtimes", "--fallbacksource", Dirs.Corehost) + dotnetCli.Restore( + "--verbosity", "verbose", + "--disable-parallel", + "--infer-runtimes", + "--fallbacksource", Dirs.Corehost) .WorkingDirectory(SharedFrameworkSourceRoot) .Execute() .EnsureSuccessful(); diff --git a/scripts/dotnet-cli-build/TestTargets.cs b/scripts/dotnet-cli-build/TestTargets.cs index ba6de920a..14a732bae 100644 --- a/scripts/dotnet-cli-build/TestTargets.cs +++ b/scripts/dotnet-cli-build/TestTargets.cs @@ -58,7 +58,7 @@ namespace Microsoft.DotNet.Cli.Build [Target(nameof(RestoreTestAssetPackages), nameof(BuildTestAssetPackages))] public static BuildTargetResult SetupTestPackages(BuildTargetContext c) => c.Success(); - [Target(nameof(RestoreTestAssetProjects), nameof(RestoreDesktopTestAssetProjects), nameof(RestoreCrossPublishTestAssetProjects), nameof(BuildTestAssetProjects))] + [Target(nameof(RestoreTestAssetProjects), nameof(RestoreDesktopTestAssetProjects), nameof(BuildTestAssetProjects))] public static BuildTargetResult SetupTestProjects(BuildTargetContext c) => c.Success(); [Target] @@ -70,7 +70,10 @@ namespace Microsoft.DotNet.Cli.Build CleanNuGetTempCache(); var dotnet = DotNetCli.Stage2; - dotnet.Restore("--verbosity", "verbose", "--infer-runtimes", "--fallbacksource", Dirs.Corehost) + dotnet.Restore("--verbosity", "verbose", + "--infer-runtimes", + "--fallbacksource", Dirs.Corehost, + "--fallbacksource", Dirs.CorehostDummyPackages) .WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestPackages")) .Execute() .EnsureSuccessful(); @@ -91,25 +94,18 @@ namespace Microsoft.DotNet.Cli.Build "--verbosity", "verbose", "--infer-runtimes", "--fallbacksource", Dirs.TestPackages, - "--fallbacksource", Dirs.Corehost) + "--fallbacksource", Dirs.Corehost, + "--fallbacksource", Dirs.CorehostDummyPackages) .WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "TestProjects")) .Execute() .EnsureSuccessful(); - // The 'ProjectWithTests' is a portable test app. Cannot call --infer-runtimes on it, since on win x64 machines, - // the x86 runtime is being inferred, and there are no x86 DotNetHost packages - dotnet.Restore( - "--verbosity", "verbose", - "--fallbacksource", Dirs.Corehost) - .WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "ProjectWithTests")) - .Execute() - .EnsureSuccessful(); - // The 'ProjectModelServer' directory contains intentionally-unresolved dependencies, so don't check for success. Also, suppress the output dotnet.Restore( "--verbosity", "verbose", "--infer-runtimes", - "--fallbacksource", Dirs.Corehost) + "--fallbacksource", Dirs.Corehost, + "--fallbacksource", Dirs.CorehostDummyPackages) .WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "ProjectModelServer", "DthTestProjects")) .Execute(); @@ -131,24 +127,13 @@ namespace Microsoft.DotNet.Cli.Build dotnet.Restore("--verbosity", "verbose", "--infer-runtimes", "--fallbacksource", Dirs.TestPackages, - "--fallbacksource", Dirs.Corehost) + "--fallbacksource", Dirs.Corehost, + "--fallbacksource", Dirs.CorehostDummyPackages) .WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "DesktopTestProjects")) .Execute().EnsureSuccessful(); return c.Success(); } - - [Target] - public static BuildTargetResult RestoreCrossPublishTestAssetProjects(BuildTargetContext c) - { - var dotnet = DotNetCli.Stage2; - - dotnet.Restore("--verbosity", "verbose") - .WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "CrossPublishTestProjects")) - .Execute().EnsureSuccessful(); - - return c.Success(); - } [Target(nameof(CleanTestPackages), nameof(CleanProductPackages))] public static BuildTargetResult BuildTestAssetPackages(BuildTargetContext c) @@ -178,7 +163,7 @@ namespace Microsoft.DotNet.Cli.Build { "netstandard1.5", "netstandard1.3", - "netstandardapp1.5" + "netcoreapp1.0" }; if (CurrentPlatform.IsWindows) @@ -262,20 +247,12 @@ namespace Microsoft.DotNet.Cli.Build foreach (var project in projects) { c.Info($"Building: {project}"); - dotnet.Build("--framework", "netstandardapp1.5") + dotnet.Build("--framework", "netcoreapp1.0") .WorkingDirectory(Path.GetDirectoryName(project)) .Execute() .EnsureSuccessful(); } - // build ProjectWithTests, which is outside of TestProjects and targets netcoreapp - string projectWithTests = Path.Combine(c.BuildContext.BuildDirectory, "TestAssets", "ProjectWithTests"); - c.Info($"Building: {projectWithTests}"); - dotnet.Build("--framework", "netcoreapp1.0") - .WorkingDirectory(projectWithTests) - .Execute() - .EnsureSuccessful(); - return c.Success(); } @@ -288,7 +265,8 @@ namespace Microsoft.DotNet.Cli.Build CleanNuGetTempCache(); DotNetCli.Stage2.Restore("--verbosity", "verbose", "--fallbacksource", Dirs.TestPackages, - "--fallbacksource", Dirs.Corehost) + "--fallbacksource", Dirs.Corehost, + "--fallbacksource", Dirs.CorehostDummyPackages) .WorkingDirectory(Path.Combine(c.BuildContext.BuildDirectory, "test")) .Execute() .EnsureSuccessful(); diff --git a/scripts/dotnet-cli-build/Utils/BuildVersion.cs b/scripts/dotnet-cli-build/Utils/BuildVersion.cs index 6c10e1ee3..40e5aecbe 100644 --- a/scripts/dotnet-cli-build/Utils/BuildVersion.cs +++ b/scripts/dotnet-cli-build/Utils/BuildVersion.cs @@ -13,6 +13,7 @@ public string VersionSuffix => $"{ReleaseSuffix}-{CommitCountString}"; public string NuGetVersion => $"{Major}.{Minor}.{Patch}-{VersionSuffix}"; public string NetCoreAppVersion => $"{Major}.{Minor}.{Patch}-rc2-3{CommitCountString}"; + public string HostNuGetPackageVersion => $"{Major}.{Minor}.1-rc2-{CommitCountString}-00"; public string ProductionVersion => $"{Major}.{Minor}.{Patch}"; public string GenerateMsiVersion() diff --git a/scripts/dotnet-cli-build/Utils/Dirs.cs b/scripts/dotnet-cli-build/Utils/Dirs.cs index 918f60517..37e7b11c4 100644 --- a/scripts/dotnet-cli-build/Utils/Dirs.cs +++ b/scripts/dotnet-cli-build/Utils/Dirs.cs @@ -23,6 +23,7 @@ namespace Microsoft.DotNet.Cli.Build public static readonly string Stage2Compilation = Path.Combine(Output, "stage2compilation"); public static readonly string Stage2Symbols = Path.Combine(Output, "stage2symbols"); public static readonly string Corehost = Path.Combine(Output, "corehost"); + public static readonly string CorehostDummyPackages = Path.Combine(Output, "corehostdummypackages"); public static readonly string TestOutput = Path.Combine(Output, "tests"); public static readonly string TestArtifacts = Path.Combine(TestOutput, "artifacts"); public static readonly string TestPackages = Path.Combine(TestOutput, "packages"); diff --git a/src/dotnet-compile-fsc/Program.cs b/src/dotnet-compile-fsc/Program.cs index 070846b7a..6c1be025c 100644 --- a/src/dotnet-compile-fsc/Program.cs +++ b/src/dotnet-compile-fsc/Program.cs @@ -85,6 +85,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Fsc bool targetNetCore = commonOptions.Defines.Contains("DNXCORE50") || commonOptions.Defines.Where(d => d.StartsWith("NETSTANDARDAPP1_")).Any() || + commonOptions.Defines.Where(d => d.StartsWith("NETCOREAPP1_")).Any() || commonOptions.Defines.Where(d => d.StartsWith("NETSTANDARD1_")).Any(); // Get FSC Path upfront to use it for win32manifest path diff --git a/src/dotnet-compile-fsc/project.json b/src/dotnet-compile-fsc/project.json index 0e72f2897..191cb9050 100644 --- a/src/dotnet-compile-fsc/project.json +++ b/src/dotnet-compile-fsc/project.json @@ -15,7 +15,7 @@ } }, "frameworks": { - "netstandard1.5": { + "netcoreapp1.0": { "imports": [ "dnxcore50", "portable-net45+win81", diff --git a/src/dotnet/commands/dotnet-publish/PublishCommand.cs b/src/dotnet/commands/dotnet-publish/PublishCommand.cs index 6f62a2970..1a5eafd10 100644 --- a/src/dotnet/commands/dotnet-publish/PublishCommand.cs +++ b/src/dotnet/commands/dotnet-publish/PublishCommand.cs @@ -77,7 +77,7 @@ namespace Microsoft.DotNet.Tools.Publish } /// - /// Publish the project for given 'framework (ex - netstandardapp1.5)' and 'runtimeID (ex - win7-x64)' + /// Publish the project for given 'framework (ex - netcoreapp1.0)' and 'runtimeID (ex - win7-x64)' /// /// project that is to be published /// Location of published files diff --git a/test/Kestrel.Tests/DotnetBuildTest.cs b/test/Kestrel.Tests/DotnetBuildTest.cs index e86195caf..fb4fc8a54 100644 --- a/test/Kestrel.Tests/DotnetBuildTest.cs +++ b/test/Kestrel.Tests/DotnetBuildTest.cs @@ -31,9 +31,9 @@ namespace Microsoft.DotNet.Kestrel.Tests var outputBase = new DirectoryInfo(Path.Combine(testRoot, "bin", "Debug")); - var netstandardappOutput = outputBase.Sub("netstandard1.5"); + var netcoreAppOutput = outputBase.Sub("netcoreapp1.0"); - netstandardappOutput.Should() + netcoreAppOutput.Should() .Exist().And .OnlyHaveFiles(new[] { diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependencyCommandResolver.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependencyCommandResolver.cs index 1681fe6a3..702d9190c 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependencyCommandResolver.cs +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectDependencyCommandResolver.cs @@ -36,7 +36,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests CommandArguments = new string[] {""}, ProjectDirectory = "/some/directory", Configuration = "Debug", - Framework = FrameworkConstants.CommonFrameworks.NetStandardApp15 + Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10 }; var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments); @@ -55,7 +55,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests CommandArguments = new string[] {""}, ProjectDirectory = null, Configuration = "Debug", - Framework = FrameworkConstants.CommonFrameworks.NetStandardApp15 + Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10 }; var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments); @@ -93,7 +93,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests CommandArguments = new string[] {""}, ProjectDirectory = s_liveProjectDirectory, Configuration = null, - Framework = FrameworkConstants.CommonFrameworks.NetStandardApp15 + Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10 }; var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments); @@ -112,7 +112,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests CommandArguments = null, ProjectDirectory = s_liveProjectDirectory, Configuration = "Debug", - Framework = FrameworkConstants.CommonFrameworks.NetStandardApp15 + Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10 }; var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments); @@ -131,7 +131,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests CommandArguments = null, ProjectDirectory = s_liveProjectDirectory, Configuration = "Debug", - Framework = FrameworkConstants.CommonFrameworks.NetStandardApp15 + Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10 }; var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments); @@ -156,7 +156,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests CommandArguments = new [] { "arg with space"}, ProjectDirectory = s_liveProjectDirectory, Configuration = "Debug", - Framework = FrameworkConstants.CommonFrameworks.NetStandardApp15 + Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10 }; var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments); @@ -176,7 +176,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests CommandArguments = null, ProjectDirectory = s_liveProjectDirectory, Configuration = "Debug", - Framework = FrameworkConstants.CommonFrameworks.NetStandardApp15 + Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10 }; var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments); @@ -196,13 +196,13 @@ namespace Microsoft.DotNet.Cli.Utils.Tests CommandArguments = null, ProjectDirectory = s_liveProjectDirectory, Configuration = "Debug", - Framework = FrameworkConstants.CommonFrameworks.NetStandardApp15, + Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10, OutputPath = AppContext.BaseDirectory }; var projectContext = ProjectContext.Create( s_liveProjectDirectory, - FrameworkConstants.CommonFrameworks.NetStandardApp15, + FrameworkConstants.CommonFrameworks.NetCoreApp10, PlatformServices.Default.Runtime.GetAllCandidateRuntimeIdentifiers()); var depsFilePath = @@ -225,13 +225,13 @@ namespace Microsoft.DotNet.Cli.Utils.Tests CommandArguments = null, ProjectDirectory = s_liveProjectDirectory, Configuration = "Debug", - Framework = FrameworkConstants.CommonFrameworks.NetStandardApp15, + Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10, BuildBasePath = AppContext.BaseDirectory }; var projectContext = ProjectContext.Create( s_liveProjectDirectory, - FrameworkConstants.CommonFrameworks.NetStandardApp15, + FrameworkConstants.CommonFrameworks.NetCoreApp10, PlatformServices.Default.Runtime.GetAllCandidateRuntimeIdentifiers()); var depsFilePath = @@ -254,7 +254,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests CommandArguments = null, ProjectDirectory = s_liveProjectDirectory, Configuration = "Debug", - Framework = FrameworkConstants.CommonFrameworks.NetStandardApp15 + Framework = FrameworkConstants.CommonFrameworks.NetCoreApp10 }; var result = projectDependenciesCommandResolver.Resolve(commandResolverArguments); diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs index 6e797bea1..74bae879f 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/StreamForwarderTests.cs @@ -139,7 +139,7 @@ namespace StreamForwarderTests buildCommand.Execute(); var buildOutputExe = "OutputStandardOutputAndError" + Constants.ExeSuffix; - var buildOutputPath = Path.Combine(binTestProjectPath, "bin/Debug/netstandardapp1.5", buildOutputExe); + var buildOutputPath = Path.Combine(binTestProjectPath, "bin/Debug/netcoreapp1.0", buildOutputExe); return buildOutputPath; } diff --git a/test/Microsoft.DotNet.ProjectModel.Tests/PackageDependencyProviderTests.cs b/test/Microsoft.DotNet.ProjectModel.Tests/PackageDependencyProviderTests.cs index eba50a521..a6ac788c6 100644 --- a/test/Microsoft.DotNet.ProjectModel.Tests/PackageDependencyProviderTests.cs +++ b/test/Microsoft.DotNet.ProjectModel.Tests/PackageDependencyProviderTests.cs @@ -29,8 +29,8 @@ namespace Microsoft.DotNet.ProjectModel.Tests target.CompileTimeAssemblies.Add("lib/dotnet/_._"); target.NativeLibraries.Add("runtimes/any/native/Microsoft.CSharp.CurrentVersion.targets"); - var p1 = provider.GetDescription(NuGetFramework.Parse("netstandardapp1.5"), package, target); - var p2 = provider.GetDescription(NuGetFramework.Parse("netstandardapp1.5"), package, target); + var p1 = provider.GetDescription(NuGetFramework.Parse("netcoreapp1.0"), package, target); + var p2 = provider.GetDescription(NuGetFramework.Parse("netcoreapp1.0"), package, target); Assert.True(p1.Compatible); Assert.True(p2.Compatible); diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Assertions/CommandResultAssertions.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Assertions/CommandResultAssertions.cs index c763ae5f3..676aaa410 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Assertions/CommandResultAssertions.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Assertions/CommandResultAssertions.cs @@ -112,16 +112,16 @@ namespace Microsoft.DotNet.Tools.Test.Utilities $"StdErr:{Environment.NewLine}{_commandResult.StdErr}{Environment.NewLine}"; ; } - public AndConstraint HaveSkippedProjectCompilation(string skippedProject) + public AndConstraint HaveSkippedProjectCompilation(string skippedProject, string frameworkFullName) { - _commandResult.StdOut.Should().Contain($"Project {skippedProject} (.NETStandardApp,Version=v1.5) was previously compiled. Skipping compilation."); + _commandResult.StdOut.Should().Contain($"Project {skippedProject} ({frameworkFullName}) was previously compiled. Skipping compilation."); return new AndConstraint(this); } - public AndConstraint HaveCompiledProject(string compiledProject) + public AndConstraint HaveCompiledProject(string compiledProject, string frameworkFullName) { - _commandResult.StdOut.Should().Contain($"Project {compiledProject} (.NETStandardApp,Version=v1.5) will be compiled"); + _commandResult.StdOut.Should().Contain($"Project {compiledProject} ({frameworkFullName}) will be compiled"); return new AndConstraint(this); } diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs index 4a0952940..54d7d8050 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/PublishCommand.cs @@ -69,6 +69,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities string config = string.IsNullOrEmpty(_config) ? "Debug" : _config; string framework = string.IsNullOrEmpty(_framework) ? _project.GetTargetFrameworks().First().FrameworkName.GetShortFolderName() : _framework; + if (!portable) { var runtime = string.IsNullOrEmpty(_runtime) ? PlatformServices.Default.Runtime.GetLegacyRestoreRuntimeIdentifier() : _runtime; diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs index 740fb7cf3..38c75693d 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs @@ -18,7 +18,8 @@ namespace Microsoft.DotNet.Tools.Test.Utilities /// public abstract class TestBase : IDisposable { - protected const string DefaultFramework = "netstandardapp1.5"; + protected const string DefaultFramework = "netcoreapp1.0"; + protected const string DefaultLibraryFramework = "netstandard1.5"; private TempRoot _temp; private static TestAssetsManager s_testsAssetsMgr; private static string s_repoRoot; diff --git a/test/Microsoft.Extensions.DependencyModel.Tests/DependencyContextJsonReaderTest.cs b/test/Microsoft.Extensions.DependencyModel.Tests/DependencyContextJsonReaderTest.cs index 6d9dab843..c70de2a94 100644 --- a/test/Microsoft.Extensions.DependencyModel.Tests/DependencyContextJsonReaderTest.cs +++ b/test/Microsoft.Extensions.DependencyModel.Tests/DependencyContextJsonReaderTest.cs @@ -26,14 +26,14 @@ namespace Microsoft.Extensions.DependencyModel.Tests var context = Read( @"{ ""runtimeTarget"": { - ""name"":"".NETStandardApp,Version=v1.5/osx.10.10-x64"" + ""name"":"".NETCoreApp,Version=v1.0/osx.10.10-x64"" }, ""targets"": { - "".NETStandardApp,Version=v1.5/osx.10.10-x64"": {}, + "".NETCoreApp,Version=v1.0/osx.10.10-x64"": {}, } }"); context.Target.IsPortable.Should().BeFalse(); - context.Target.Framework.Should().Be(".NETStandardApp,Version=v1.5"); + context.Target.Framework.Should().Be(".NETCoreApp,Version=v1.0"); context.Target.Runtime.Should().Be("osx.10.10-x64"); } @@ -78,7 +78,7 @@ namespace Microsoft.Extensions.DependencyModel.Tests var context = Read( @"{ ""targets"": { - "".NETStandardApp,Version=v1.5"": {} + "".NETCoreApp,Version=v1.0"": {} } }"); context.Target.IsPortable.Should().BeTrue(); @@ -90,10 +90,10 @@ namespace Microsoft.Extensions.DependencyModel.Tests var context = Read( @"{ ""runtimeTarget"": { - ""name"": "".NETStandardApp,Version=v1.5/osx.10.10-x64"" + ""name"": "".NETCoreApp,Version=v1.0/osx.10.10-x64"" }, ""targets"": { - "".NETStandardApp,Version=v1.5/osx.10.10-x64"": {} + "".NETCoreApp,Version=v1.0/osx.10.10-x64"": {} } }"); context.Target.IsPortable.Should().BeFalse(); @@ -105,10 +105,10 @@ namespace Microsoft.Extensions.DependencyModel.Tests var context = Read( @"{ ""targets"": { - "".NETStandardApp,Version=v1.5"": {} + "".NETCoreApp,Version=v1.0"": {} } }"); - context.Target.Framework.Should().Be(".NETStandardApp,Version=v1.5"); + context.Target.Framework.Should().Be(".NETCoreApp,Version=v1.0"); } [Fact] @@ -117,7 +117,7 @@ namespace Microsoft.Extensions.DependencyModel.Tests var context = Read( @"{ ""targets"": { - "".NETStandardApp,Version=v1.5/osx.10.10-x64"": {}, + "".NETCoreApp,Version=v1.0/osx.10.10-x64"": {}, }, ""runtimes"": { ""osx.10.10-x64"": [ ], @@ -141,7 +141,7 @@ namespace Microsoft.Extensions.DependencyModel.Tests var context = Read( @"{ ""targets"": { - "".NETStandardApp,Version=v1.5"": { + "".NETCoreApp,Version=v1.0"": { ""MyApp/1.0.1"": { ""dependencies"": { ""AspNet.Mvc"": ""1.0.0"" @@ -192,10 +192,10 @@ namespace Microsoft.Extensions.DependencyModel.Tests var context = Read( @"{ ""runtimeTarget"": { - ""name"": "".NETStandardApp,Version=v1.5"" + ""name"": "".NETCoreApp,Version=v1.0"" }, ""targets"": { - "".NETStandardApp,Version=v1.5"": { + "".NETCoreApp,Version=v1.0"": { ""MyApp/1.0.1"": { ""dependencies"": { ""AspNet.Mvc"": ""1.0.0"" @@ -257,9 +257,9 @@ namespace Microsoft.Extensions.DependencyModel.Tests { var context = Read( @"{ - ""runtimeTarget"": "".NETStandardApp,Version=v1.5"", + ""runtimeTarget"": "".NETCoreApp,Version=v1.0"", ""targets"": { - "".NETStandardApp,Version=v1.5"": { + "".NETCoreApp,Version=v1.0"": { ""System.Banana/1.0.0"": { ""runtimeTargets"": { ""runtime/win7-x64/lib/_._"": { ""assetType"": ""runtime"", ""rid"": ""win7-x64""}, @@ -305,7 +305,7 @@ namespace Microsoft.Extensions.DependencyModel.Tests ""optimize"": true }, ""targets"": { - "".NETStandardApp,Version=v1.5/osx.10.10-x64"": {}, + "".NETCoreApp,Version=v1.0/osx.10.10-x64"": {}, } }"); context.CompilationOptions.AllowUnsafe.Should().Be(true); diff --git a/test/Microsoft.Extensions.DependencyModel.Tests/FunctionalTests.cs b/test/Microsoft.Extensions.DependencyModel.Tests/FunctionalTests.cs index e051f178a..476671ebb 100644 --- a/test/Microsoft.Extensions.DependencyModel.Tests/FunctionalTests.cs +++ b/test/Microsoft.Extensions.DependencyModel.Tests/FunctionalTests.cs @@ -33,7 +33,7 @@ namespace Microsoft.Extensions.DependencyModel var runCommand = new RunCommand(testProject); var result = runCommand.ExecuteWithCapturedOutput(); result.Should().Pass(); - ValidateRuntimeLibrarites(result, appname); + ValidateRuntimeLibraries(result, appname); if (checkCompilation) { ValidateCompilationLibraries(result, appname); @@ -56,7 +56,7 @@ namespace Microsoft.Extensions.DependencyModel var exeName = portable ? publishCommand.GetPortableOutputName() : publishCommand.GetOutputExecutable(); var result = TestExecutable(publishCommand.GetOutputDirectory(portable).FullName, exeName, string.Empty); - ValidateRuntimeLibrarites(result, appname); + ValidateRuntimeLibraries(result, appname); if (checkCompilation) { ValidateCompilationLibraries(result, appname); @@ -72,7 +72,7 @@ namespace Microsoft.Extensions.DependencyModel var runCommand = new RunCommand(testProject); var result = runCommand.ExecuteWithCapturedOutput(); result.Should().Pass(); - ValidateRuntimeLibraritesFullClr(result, "TestAppFullClr"); + ValidateRuntimeLibrariesFullClr(result, "TestAppFullClr"); ValidateCompilationLibrariesFullClr(result, "TestAppFullClr"); } @@ -86,11 +86,11 @@ namespace Microsoft.Extensions.DependencyModel publishCommand.Execute().Should().Pass(); var result = TestExecutable(publishCommand.GetOutputDirectory().FullName, publishCommand.GetOutputExecutable(), string.Empty); - ValidateRuntimeLibraritesFullClr(result, "TestAppFullClr"); + ValidateRuntimeLibrariesFullClr(result, "TestAppFullClr"); ValidateCompilationLibrariesFullClr(result, "TestAppFullClr"); } - private void ValidateRuntimeLibraritesFullClr(CommandResult result, string appname) + private void ValidateRuntimeLibrariesFullClr(CommandResult result, string appname) { // entry assembly result.Should().HaveStdOutContaining($"Runtime {appname}:{appname}"); @@ -109,7 +109,7 @@ namespace Microsoft.Extensions.DependencyModel } - private void ValidateRuntimeLibrarites(CommandResult result, string appname) + private void ValidateRuntimeLibraries(CommandResult result, string appname) { // entry assembly result.Should().HaveStdOutContaining($"Runtime {appname}:{appname}"); diff --git a/test/ScriptExecutorTests/ScriptExecutorTests.cs b/test/ScriptExecutorTests/ScriptExecutorTests.cs index 48a5d7212..b3797233d 100644 --- a/test/ScriptExecutorTests/ScriptExecutorTests.cs +++ b/test/ScriptExecutorTests/ScriptExecutorTests.cs @@ -25,7 +25,7 @@ namespace Microsoft.DotNet.Cli.Utils.ScriptExecutorTests var sourceTestProjectPath = Path.Combine(s_testProjectRoot, "TestApp"); binTestProjectPath = _root.CopyDirectory(sourceTestProjectPath).Path; - project = ProjectContext.Create(binTestProjectPath, NuGetFramework.Parse("netstandardapp1.5")).ProjectFile; + project = ProjectContext.Create(binTestProjectPath, NuGetFramework.Parse("netcoreapp1.0")).ProjectFile; } [Fact] diff --git a/test/dotnet-build.Tests/BuildOutputTests.cs b/test/dotnet-build.Tests/BuildOutputTests.cs index 90125de87..74b081374 100644 --- a/test/dotnet-build.Tests/BuildOutputTests.cs +++ b/test/dotnet-build.Tests/BuildOutputTests.cs @@ -101,7 +101,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests framework: DefaultFramework) .ExecuteWithCapturedOutput().Should().Pass(); - var libdebug = _rootDirInfo.Sub(FormatPath(expectedLibCompile, DefaultFramework, _runtime)); + var libdebug = _rootDirInfo.Sub(FormatPath(expectedLibCompile, DefaultLibraryFramework, _runtime)); var appdebug = _rootDirInfo.Sub(FormatPath(expectedAppCompile, DefaultFramework, _runtime)); var appruntime = _rootDirInfo.Sub(FormatPath(expectedAppRuntime, DefaultFramework, _runtime)); @@ -128,10 +128,10 @@ namespace Microsoft.DotNet.Tools.Builder.Tests new BuildCommand(GetProjectPath(_testLibDirInfo), output: outputValue != null ? Path.Combine(_testProjectsRoot, outputValue) : string.Empty, buildBasePath: baseValue != null ? Path.Combine(_testProjectsRoot, baseValue) : string.Empty, - framework: DefaultFramework) + framework: DefaultLibraryFramework) .ExecuteWithCapturedOutput().Should().Pass(); - var libdebug = _rootDirInfo.Sub(FormatPath(expectedLibCompile, DefaultFramework, _runtime)); + var libdebug = _rootDirInfo.Sub(FormatPath(expectedLibCompile, DefaultLibraryFramework, _runtime)); libdebug.Should().Exist() .And.HaveFiles(_libCompileFiles) @@ -144,12 +144,12 @@ namespace Microsoft.DotNet.Tools.Builder.Tests var testInstance = TestAssetsManager.CreateTestInstance("TestLibraryWithConfiguration") .WithLockFiles(); - var cmd = new BuildCommand(Path.Combine(testInstance.TestRoot, Project.FileName), framework: DefaultFramework); + var cmd = new BuildCommand(Path.Combine(testInstance.TestRoot, Project.FileName), framework: DefaultLibraryFramework); cmd.Environment["DOTNET_BUILD_VERSION"] = "85"; cmd.Environment["DOTNET_ASSEMBLY_FILE_VERSION"] = "345"; cmd.ExecuteWithCapturedOutput().Should().Pass(); - var output = Path.Combine(testInstance.TestRoot, "bin", "Debug", DefaultFramework, "TestLibraryWithConfiguration.dll"); + var output = Path.Combine(testInstance.TestRoot, "bin", "Debug", DefaultLibraryFramework, "TestLibraryWithConfiguration.dll"); var informationalVersion = PeReaderUtils.GetAssemblyAttributeValue(output, "AssemblyInformationalVersionAttribute"); var fileVersion = PeReaderUtils.GetAssemblyAttributeValue(output, "AssemblyFileVersionAttribute"); @@ -166,10 +166,10 @@ namespace Microsoft.DotNet.Tools.Builder.Tests var testInstance = TestAssetsManager.CreateTestInstance("TestLibraryWithConfiguration") .WithLockFiles(); - var cmd = new BuildCommand(Path.Combine(testInstance.TestRoot, Project.FileName), framework: DefaultFramework, versionSuffix: "85"); + var cmd = new BuildCommand(Path.Combine(testInstance.TestRoot, Project.FileName), framework: DefaultLibraryFramework, versionSuffix: "85"); cmd.ExecuteWithCapturedOutput().Should().Pass(); - var output = Path.Combine(testInstance.TestRoot, "bin", "Debug", DefaultFramework, "TestLibraryWithConfiguration.dll"); + var output = Path.Combine(testInstance.TestRoot, "bin", "Debug", DefaultLibraryFramework, "TestLibraryWithConfiguration.dll"); var informationalVersion = PeReaderUtils.GetAssemblyAttributeValue(output, "AssemblyInformationalVersionAttribute"); informationalVersion.Should().NotBeNull(); @@ -180,7 +180,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests // [InlineData("net20", false, true)] // [InlineData("net40", true, true)] // [InlineData("net461", true, true)] - [InlineData("netstandardapp1.5", true, false)] + [InlineData("netstandard1.5", true, false)] public void MultipleFrameworks_ShouldHaveValidTargetFrameworkAttribute(string frameworkName, bool shouldHaveTargetFrameworkAttribute, bool windowsOnly) { var framework = NuGetFramework.Parse(frameworkName); @@ -274,7 +274,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests new BuildCommand(GetProjectPath(_testAppDirDirInfo), framework: DefaultFramework) .ExecuteWithCapturedOutput().Should().Pass(); - var libdebug = _testLibDirInfo.Sub("bin/Debug").Sub(DefaultFramework); + var libdebug = _testLibDirInfo.Sub("bin/Debug").Sub(DefaultLibraryFramework); var appdebug = _testAppDirDirInfo.Sub("bin/Debug").Sub(DefaultFramework); var appruntime = appdebug.Sub(_runtime); diff --git a/test/dotnet-build.Tests/BuildPortableTests.cs b/test/dotnet-build.Tests/BuildPortableTests.cs index d55028f95..76f782799 100644 --- a/test/dotnet-build.Tests/BuildPortableTests.cs +++ b/test/dotnet-build.Tests/BuildPortableTests.cs @@ -14,9 +14,9 @@ namespace Microsoft.DotNet.Tools.Builder.Tests { var testInstance = TestAssetsManager.CreateTestInstance("PortableTests").WithLockFiles(); - var netstandardappOutput = Build(testInstance); + var netcoreAppOutput = Build(testInstance); - netstandardappOutput.Should().Exist().And.HaveFile("PortableApp.deps.json"); + netcoreAppOutput.Should().Exist().And.HaveFile("PortableApp.deps.json"); } [Fact] @@ -24,9 +24,9 @@ namespace Microsoft.DotNet.Tools.Builder.Tests { var testInstance = TestAssetsManager.CreateTestInstance("PortableTests").WithLockFiles(); - var netstandardappOutput = Build(testInstance); + var netcoreAppOutput = Build(testInstance); - netstandardappOutput.Should().Exist().And.HaveFile("PortableApp.dll"); + netcoreAppOutput.Should().Exist().And.HaveFile("PortableApp.dll"); } [Fact] @@ -34,9 +34,9 @@ namespace Microsoft.DotNet.Tools.Builder.Tests { var testInstance = TestAssetsManager.CreateTestInstance("PortableTests").WithLockFiles(); - var netstandardappOutput = Build(testInstance); + var netcoreAppOutput = Build(testInstance); - netstandardappOutput.Should().Exist().And.HaveFile("PortableApp.pdb"); + netcoreAppOutput.Should().Exist().And.HaveFile("PortableApp.pdb"); } [Fact] @@ -44,9 +44,9 @@ namespace Microsoft.DotNet.Tools.Builder.Tests { var testInstance = TestAssetsManager.CreateTestInstance("PortableTests").WithLockFiles(); - var netstandardappOutput = Build(testInstance); + var netcoreAppOutput = Build(testInstance); - netstandardappOutput.Should().Exist().And.HaveFile("PortableApp.runtimeconfig.json"); + netcoreAppOutput.Should().Exist().And.HaveFile("PortableApp.runtimeconfig.json"); } [Fact] @@ -55,9 +55,9 @@ namespace Microsoft.DotNet.Tools.Builder.Tests var testInstance = TestAssetsManager.CreateTestInstance("PortableTests") .WithLockFiles(); - var netstandardappOutput = Build(testInstance); + var netcoreAppOutput = Build(testInstance); - var runtimeConfigJsonPath = Path.Combine(netstandardappOutput.FullName, "PortableApp.runtimeconfig.json"); + var runtimeConfigJsonPath = Path.Combine(netcoreAppOutput.FullName, "PortableApp.runtimeconfig.json"); using (var stream = new FileStream(runtimeConfigJsonPath, FileMode.Open, FileAccess.Read, FileShare.Read)) { @@ -78,9 +78,9 @@ namespace Microsoft.DotNet.Tools.Builder.Tests { var testInstance = TestAssetsManager.CreateTestInstance("PortableTests").WithLockFiles(); - var netstandardappOutput = Build(testInstance); + var netcoreAppOutput = Build(testInstance); - netstandardappOutput.Should().Exist().And.HaveFile("PortableApp.runtimeconfig.dev.json"); + netcoreAppOutput.Should().Exist().And.HaveFile("PortableApp.runtimeconfig.dev.json"); } private DirectoryInfo Build(TestInstance testInstance) @@ -93,7 +93,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests var outputBase = new DirectoryInfo(Path.Combine(testInstance.TestRoot, "PortableApp", "bin", "Debug")); - return outputBase.Sub("netstandard1.5"); + return outputBase.Sub("netcoreapp1.0"); } } } diff --git a/test/dotnet-build.Tests/BuildProjectToProjectTests.cs b/test/dotnet-build.Tests/BuildProjectToProjectTests.cs index 8735a84a6..26d2e72c0 100644 --- a/test/dotnet-build.Tests/BuildProjectToProjectTests.cs +++ b/test/dotnet-build.Tests/BuildProjectToProjectTests.cs @@ -16,7 +16,9 @@ namespace Microsoft.DotNet.Tools.Builder.Tests public class ProjectToProjectDependenciesIncrementalTest : IncrementalTestBase { private readonly string[] _projects = new[] { "L0", "L11", "L12", "L21", "L22" }; + private readonly string _appProject = "L0"; + private string MainProjectExe { get @@ -32,13 +34,12 @@ namespace Microsoft.DotNet.Tools.Builder.Tests } - [Theory, - InlineData("1", "L0", new[] { "L0" }), - InlineData("2", "L11", new[] { "L0", "L11" }), - InlineData("3", "L12", new[] { "L0", "L11", "L12" }), - InlineData("4", "L22", new[] { "L0", "L11", "L12", "L22" }), - InlineData("5", "L21", new[] { "L0", "L11", "L21" }) - ] + [Theory] + [InlineData("1", "L0", new[] { "L0" })] + [InlineData("2", "L11", new[] { "L0", "L11" })] + [InlineData("3", "L12", new[] { "L0", "L11", "L12" })] + [InlineData("4", "L22", new[] { "L0", "L11", "L12", "L22" })] + [InlineData("5", "L21", new[] { "L0", "L11", "L21" })] public void TestIncrementalBuildOfDependencyGraph(string testIdentifer, string projectToTouch, string[] expectedRebuiltProjects) { var testInstance = TestAssetsManager.CreateTestInstance("TestProjectToProjectDependencies", identifier: testIdentifer) @@ -81,7 +82,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests // third build with no dependencies but incremental; nothing rebuilds var result3 = BuildProject(noDependencies: true); - result3.Should().HaveSkippedProjectCompilation("L0"); + result3.Should().HaveSkippedProjectCompilation("L0", _appFrameworkFullName); AssertResultDoesNotContainStrings(result3, dependencies); } @@ -105,15 +106,40 @@ namespace Microsoft.DotNet.Tools.Builder.Tests { foreach (var rebuiltProject in expectedRebuilt) { - buildResult.Should().HaveCompiledProject(rebuiltProject); + string frameworkFullName = null; + + if (TestProjectIsApp(rebuiltProject)) + { + buildResult + .Should() + .HaveCompiledProject(rebuiltProject, frameworkFullName: _appFrameworkFullName); + } + else + { + buildResult + .Should() + .HaveCompiledProject(rebuiltProject, _libraryFrameworkFullName); + } } foreach (var skippedProject in SetDifference(_projects, expectedRebuilt)) { - buildResult.Should().HaveSkippedProjectCompilation(skippedProject); + if (TestProjectIsApp(skippedProject)) + { + buildResult.Should().HaveSkippedProjectCompilation(skippedProject, _appFrameworkFullName); + } + else + { + buildResult.Should().HaveSkippedProjectCompilation(skippedProject, _libraryFrameworkFullName); + } } } + private bool TestProjectIsApp(string testproject) + { + return testproject.Equals(_appProject, StringComparison.OrdinalIgnoreCase); + } + protected override string GetProjectDirectory(string projectName) { return Path.Combine(TestProjectRoot, "src", projectName); diff --git a/test/dotnet-build.Tests/BuildStandAloneTests.cs b/test/dotnet-build.Tests/BuildStandAloneTests.cs index 7fcb485e3..0d53cdedd 100644 --- a/test/dotnet-build.Tests/BuildStandAloneTests.cs +++ b/test/dotnet-build.Tests/BuildStandAloneTests.cs @@ -79,7 +79,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests result.Should().Pass(); var outputBase = new DirectoryInfo( - Path.Combine(testInstance.TestRoot, "StandaloneApp", "bin", "Debug", "netstandardapp1.5")); + Path.Combine(testInstance.TestRoot, "StandaloneApp", "bin", "Debug", "netcoreapp1.0")); return outputBase.Sub(runtime); } diff --git a/test/dotnet-build.Tests/IncrementalTestBase.cs b/test/dotnet-build.Tests/IncrementalTestBase.cs index 00de012d9..58293e342 100644 --- a/test/dotnet-build.Tests/IncrementalTestBase.cs +++ b/test/dotnet-build.Tests/IncrementalTestBase.cs @@ -12,6 +12,9 @@ namespace Microsoft.DotNet.Tools.Builder.Tests { public class IncrementalTestBase : TestBase { + protected readonly string _libraryFrameworkFullName = ".NETStandard,Version=v1.5"; + protected readonly string _appFrameworkFullName = ".NETCoreApp,Version=v1.0"; + protected virtual string MainProject { get; set; @@ -66,7 +69,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests protected CommandResult BuildProject(string projectFile, bool noDependencies = false, bool noIncremental = false, bool expectBuildFailure = false) { - var buildCommand = new BuildCommand(projectFile, output: GetOutputDir(), framework: "netstandardapp1.5", noIncremental: noIncremental, noDependencies : noDependencies); + var buildCommand = new BuildCommand(projectFile, output: GetOutputDir(), framework: "netcoreapp1.0", noIncremental: noIncremental, noDependencies : noDependencies); var result = buildCommand.ExecuteWithCapturedOutput(); if (!expectBuildFailure) @@ -120,14 +123,14 @@ namespace Microsoft.DotNet.Tools.Builder.Tests protected string GetCompilationOutputPath() { - var executablePath = Path.Combine(GetBinRoot(), "Debug", "netstandardapp1.5"); + var executablePath = Path.Combine(GetBinRoot(), "Debug", "netcoreapp1.0"); return executablePath; } protected string GetIntermediaryOutputPath() { - var executablePath = Path.Combine(TestProjectRoot, "obj", "Debug", "netstandardapp1.5"); + var executablePath = Path.Combine(TestProjectRoot, "obj", "Debug", "netcoreapp1.0"); return executablePath; } diff --git a/test/dotnet-build.Tests/IncrementalTests.cs b/test/dotnet-build.Tests/IncrementalTests.cs index 0c5c034b6..78778fb0a 100644 --- a/test/dotnet-build.Tests/IncrementalTests.cs +++ b/test/dotnet-build.Tests/IncrementalTests.cs @@ -14,7 +14,6 @@ namespace Microsoft.DotNet.Tools.Builder.Tests { public class IncrementalTests : IncrementalTestBase { - public IncrementalTests() { MainProject = "TestSimpleIncrementalApp"; @@ -36,7 +35,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests CreateTestInstance(); var buildResult = BuildProject(); - buildResult.Should().HaveCompiledProject(MainProject); + buildResult.Should().HaveCompiledProject(MainProject, _appFrameworkFullName); buildResult = BuildProject(noIncremental: true); Assert.Contains("[Forced Unsafe]", buildResult.StdOut); @@ -68,7 +67,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests { CreateTestInstance(); var buildResult = BuildProject(); - buildResult.Should().HaveCompiledProject(MainProject); + buildResult.Should().HaveCompiledProject(MainProject, _appFrameworkFullName); var lockFile = Path.Combine(TestProjectRoot, "project.lock.json"); Assert.True(File.Exists(lockFile)); @@ -84,7 +83,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests public void TestModifiedVersionFile() { CreateTestInstance(); - BuildProject().Should().HaveCompiledProject(MainProject); + BuildProject().Should().HaveCompiledProject(MainProject, _appFrameworkFullName); //change version file var versionFile = Path.Combine(GetIntermediaryOutputPath(), ".SDKVersion"); @@ -92,14 +91,14 @@ namespace Microsoft.DotNet.Tools.Builder.Tests File.AppendAllText(versionFile, "text"); //assert rebuilt - BuildProject().Should().HaveCompiledProject(MainProject); + BuildProject().Should().HaveCompiledProject(MainProject, _appFrameworkFullName); } [Fact] public void TestNoVersionFile() { CreateTestInstance(); - BuildProject().Should().HaveCompiledProject(MainProject); + BuildProject().Should().HaveCompiledProject(MainProject, _appFrameworkFullName); //delete version file var versionFile = Path.Combine(GetIntermediaryOutputPath(), ".SDKVersion"); @@ -108,7 +107,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests File.Exists(versionFile).Should().BeFalse(); //assert build skipped due to no version file - BuildProject().Should().HaveSkippedProjectCompilation(MainProject); + BuildProject().Should().HaveSkippedProjectCompilation(MainProject, _appFrameworkFullName); //the version file should have been regenerated during the build, even if compilation got skipped File.Exists(versionFile).Should().BeTrue(); @@ -119,13 +118,13 @@ namespace Microsoft.DotNet.Tools.Builder.Tests { CreateTestInstance(); var buildResult = BuildProject(); - buildResult.Should().HaveCompiledProject(MainProject); + buildResult.Should().HaveCompiledProject(MainProject, _appFrameworkFullName); var lockFile = Path.Combine(TestProjectRoot, "project.lock.json"); TouchFile(lockFile); buildResult = BuildProject(); - buildResult.Should().HaveCompiledProject(MainProject); + buildResult.Should().HaveCompiledProject(MainProject, _appFrameworkFullName); } [Fact] @@ -133,12 +132,12 @@ namespace Microsoft.DotNet.Tools.Builder.Tests { CreateTestInstance(); var buildResult = BuildProject(); - buildResult.Should().HaveCompiledProject(MainProject); + buildResult.Should().HaveCompiledProject(MainProject, _appFrameworkFullName); TouchFile(GetProjectFile(MainProject)); buildResult = BuildProject(); - buildResult.Should().HaveCompiledProject(MainProject); + buildResult.Should().HaveCompiledProject(MainProject, _appFrameworkFullName); } // regression for https://github.com/dotnet/cli/issues/965 @@ -147,7 +146,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests { CreateTestInstance(); var buildResult = BuildProject(); - buildResult.Should().HaveCompiledProject(MainProject); + buildResult.Should().HaveCompiledProject(MainProject, _appFrameworkFullName); var outputTimestamp = SetAllOutputItemsToSameTime(); @@ -157,7 +156,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests File.SetLastWriteTime(GetProjectFile(MainProject), outputTimestamp); buildResult = BuildProject(); - buildResult.Should().HaveCompiledProject(MainProject); + buildResult.Should().HaveCompiledProject(MainProject, _appFrameworkFullName); } private DateTime SetAllOutputItemsToSameTime() @@ -174,7 +173,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests { var buildResult = BuildProject(); - buildResult.Should().HaveCompiledProject(MainProject); + buildResult.Should().HaveCompiledProject(MainProject, _appFrameworkFullName); Reporter.Verbose.WriteLine($"Files in {GetBinRoot()}"); foreach (var file in Directory.EnumerateFiles(GetBinRoot())) @@ -198,7 +197,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests // second build; should get rebuilt since we deleted an output item buildResult = BuildProject(); - buildResult.Should().HaveCompiledProject(MainProject); + buildResult.Should().HaveCompiledProject(MainProject, _appFrameworkFullName); } } } \ No newline at end of file diff --git a/test/dotnet-build.Tests/IncrementalTestsOnCultureSpecificResource.cs b/test/dotnet-build.Tests/IncrementalTestsOnCultureSpecificResource.cs index 23f5b9cbe..5b1dc1ffb 100644 --- a/test/dotnet-build.Tests/IncrementalTestsOnCultureSpecificResource.cs +++ b/test/dotnet-build.Tests/IncrementalTestsOnCultureSpecificResource.cs @@ -26,11 +26,11 @@ namespace Microsoft.DotNet.Tools.Builder.Tests TestProjectRoot = testInstance.TestRoot; var buildResult = BuildProject(); - buildResult.Should().HaveCompiledProject(MainProject); + buildResult.Should().HaveCompiledProject(MainProject, _appFrameworkFullName); buildResult = BuildProject(); - buildResult.Should().HaveSkippedProjectCompilation(MainProject); + buildResult.Should().HaveSkippedProjectCompilation(MainProject, _appFrameworkFullName); } } } diff --git a/test/dotnet-build.Tests/IncrementalTestsOnResources.cs b/test/dotnet-build.Tests/IncrementalTestsOnResources.cs index 869fc2ad2..815a2d6c6 100644 --- a/test/dotnet-build.Tests/IncrementalTestsOnResources.cs +++ b/test/dotnet-build.Tests/IncrementalTestsOnResources.cs @@ -25,10 +25,10 @@ namespace Microsoft.DotNet.Tools.Builder.Tests TestProjectRoot = testInstance.TestRoot; var buildResult = BuildProject(); - buildResult.Should().HaveCompiledProject(MainProject); + buildResult.Should().HaveCompiledProject(MainProject, _appFrameworkFullName); buildResult = BuildProject(); - buildResult.Should().HaveSkippedProjectCompilation(MainProject); + buildResult.Should().HaveSkippedProjectCompilation(MainProject, _appFrameworkFullName); } } } diff --git a/test/dotnet-build.Tests/IncrementalTestsTransitiveRuntime.cs b/test/dotnet-build.Tests/IncrementalTestsTransitiveRuntime.cs index 9a95fb238..9d2e82125 100644 --- a/test/dotnet-build.Tests/IncrementalTestsTransitiveRuntime.cs +++ b/test/dotnet-build.Tests/IncrementalTestsTransitiveRuntime.cs @@ -27,17 +27,17 @@ namespace Microsoft.DotNet.Tools.Builder.Tests .WithLockFiles(); TestProjectRoot = testInstance.TestRoot; var buildResult = BuildProject(); - buildResult.Should().HaveCompiledProject(MainProject); - buildResult.Should().HaveCompiledProject(TestLibraryWithAppDependency); - buildResult.Should().HaveCompiledProject(AppProject); - buildResult.Should().HaveCompiledProject(LibraryProject); + buildResult.Should().HaveCompiledProject(MainProject, _appFrameworkFullName); + buildResult.Should().HaveCompiledProject(TestLibraryWithAppDependency, _appFrameworkFullName); + buildResult.Should().HaveCompiledProject(AppProject, _appFrameworkFullName); + buildResult.Should().HaveCompiledProject(LibraryProject, _appFrameworkFullName); buildResult = BuildProject(); - buildResult.Should().HaveSkippedProjectCompilation(MainProject); - buildResult.Should().HaveSkippedProjectCompilation(TestLibraryWithAppDependency); - buildResult.Should().HaveSkippedProjectCompilation(AppProject); - buildResult.Should().HaveSkippedProjectCompilation(LibraryProject); + buildResult.Should().HaveSkippedProjectCompilation(MainProject, _appFrameworkFullName); + buildResult.Should().HaveSkippedProjectCompilation(TestLibraryWithAppDependency, _appFrameworkFullName); + buildResult.Should().HaveSkippedProjectCompilation(AppProject, _appFrameworkFullName); + buildResult.Should().HaveSkippedProjectCompilation(LibraryProject, _appFrameworkFullName); } protected override string GetProjectDirectory(string projectName) diff --git a/test/dotnet-compile.Tests/CompilerTests.cs b/test/dotnet-compile.Tests/CompilerTests.cs index efbb5abf9..008dc853c 100644 --- a/test/dotnet-compile.Tests/CompilerTests.cs +++ b/test/dotnet-compile.Tests/CompilerTests.cs @@ -35,12 +35,12 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests // run compile var outputDir = Path.Combine(testLibDir.Path, "bin"); var testProject = GetProjectPath(testLibDir); - var buildCommand = new BuildCommand(testProject, output: outputDir, framework: DefaultFramework); + var buildCommand = new BuildCommand(testProject, output: outputDir, framework: DefaultLibraryFramework); var result = buildCommand.ExecuteWithCapturedOutput(); result.Should().Pass(); // verify the output xml file - var outputXml = Path.Combine(outputDir, "Debug", DefaultFramework, "TestLibrary.xml"); + var outputXml = Path.Combine(outputDir, "Debug", DefaultLibraryFramework, "TestLibrary.xml"); Console.WriteLine("OUTPUT XML PATH: " + outputXml); Assert.True(File.Exists(outputXml)); Assert.Contains("Gets the message from the helper", File.ReadAllText(outputXml)); @@ -84,7 +84,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests // run compile var outputDir = Path.Combine(testLibDir.Path, "bin"); var testProject = GetProjectPath(testLibDir); - var buildCmd = new BuildCommand(testProject, output: outputDir, framework: DefaultFramework); + var buildCmd = new BuildCommand(testProject, output: outputDir, framework: DefaultLibraryFramework); var result = buildCmd.ExecuteWithCapturedOutput(); result.Should().Pass(); @@ -158,7 +158,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests var root = testInstance.TestRoot; var outputDir = Path.Combine(root, "bin"); var testProject = ProjectUtils.GetProjectJson(root, "LibraryWithOutputAssemblyName"); - var buildCommand = new BuildCommand(testProject, output: outputDir, framework: DefaultFramework); + var buildCommand = new BuildCommand(testProject, output: outputDir, framework: DefaultLibraryFramework); var result = buildCommand.ExecuteWithCapturedOutput(); result.Should().Pass(); diff --git a/test/dotnet-compile.UnitTests/GivenACompilationDriver.cs b/test/dotnet-compile.UnitTests/GivenACompilationDriver.cs index 4d4fb34b9..ef72e0566 100644 --- a/test/dotnet-compile.UnitTests/GivenACompilationDriver.cs +++ b/test/dotnet-compile.UnitTests/GivenACompilationDriver.cs @@ -36,7 +36,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests _contexts = new List { - ProjectContext.Create(_projectJson, NuGetFramework.Parse("netstandardapp1.5")) + ProjectContext.Create(_projectJson, NuGetFramework.Parse("netcoreapp1.0")) }; _args = new CompilerCommandApp("dotnet compile", ".NET Compiler", "Compiler for the .NET Platform"); diff --git a/test/dotnet-compile.UnitTests/GivenThatICareAboutScriptVariablesFromAManagedCompiler.cs b/test/dotnet-compile.UnitTests/GivenThatICareAboutScriptVariablesFromAManagedCompiler.cs index 961240a69..e4c3c14de 100644 --- a/test/dotnet-compile.UnitTests/GivenThatICareAboutScriptVariablesFromAManagedCompiler.cs +++ b/test/dotnet-compile.UnitTests/GivenThatICareAboutScriptVariablesFromAManagedCompiler.cs @@ -28,14 +28,14 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests public void It_passes_a_FullTargetFramework_variable_to_the_pre_compile_scripts() { _fixture.PreCompileScriptVariables.Should().ContainKey("compile:FullTargetFramework"); - _fixture.PreCompileScriptVariables["compile:FullTargetFramework"].Should().Be(".NETStandardApp,Version=v1.5"); + _fixture.PreCompileScriptVariables["compile:FullTargetFramework"].Should().Be(".NETCoreApp,Version=v1.0"); } [Fact] public void It_passes_a_TargetFramework_variable_to_the_pre_compile_scripts() { _fixture.PreCompileScriptVariables.Should().ContainKey("compile:TargetFramework"); - _fixture.PreCompileScriptVariables["compile:TargetFramework"].Should().Be("netstandardapp1.5"); + _fixture.PreCompileScriptVariables["compile:TargetFramework"].Should().Be("netcoreapp1.0"); } [Fact] @@ -80,14 +80,14 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests public void It_passes_a_FullTargetFramework_variable_to_the_post_compile_scripts() { _fixture.PostCompileScriptVariables.Should().ContainKey("compile:FullTargetFramework"); - _fixture.PostCompileScriptVariables["compile:FullTargetFramework"].Should().Be(".NETStandardApp,Version=v1.5"); + _fixture.PostCompileScriptVariables["compile:FullTargetFramework"].Should().Be(".NETCoreApp,Version=v1.0"); } [Fact] public void It_passes_a_TargetFramework_variable_to_the_post_compile_scripts() { _fixture.PostCompileScriptVariables.Should().ContainKey("compile:TargetFramework"); - _fixture.PostCompileScriptVariables["compile:TargetFramework"].Should().Be("netstandardapp1.5"); + _fixture.PostCompileScriptVariables["compile:TargetFramework"].Should().Be("netcoreapp1.0"); } [Fact] @@ -138,6 +138,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests public class ScriptVariablesFixture { + public readonly NuGetFramework TestAssetFramework = FrameworkConstants.CommonFrameworks.NetCoreApp10; public const string ConfigValue = "Debug"; public static string TestAssetPath = Path.Combine( @@ -151,7 +152,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests TestAssetPath, "bin", ConfigValue, - "netstandardapp1.5"); + "netcoreapp1.0"); public string RuntimeOutputDir { get; private set; } @@ -161,7 +162,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests TestAssetPath, "obj", ConfigValue, - "netstandardapp1.5", + "netcoreapp1.0", "dotnet-compile.rsp"); public Dictionary PreCompileScriptVariables { get; private set; } @@ -218,7 +219,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests rids.Add(rid); } - var context = ProjectContext.Create(projectJson, new NuGetFramework(".NETStandardApp", new Version(1, 5)), rids); + var context = ProjectContext.Create(projectJson, TestAssetFramework, rids); managedCompiler.Compile(context, _args); RuntimeOutputDir = Path.Combine(OutputPath, rid); diff --git a/test/dotnet-pack.Tests/PackTests.cs b/test/dotnet-pack.Tests/PackTests.cs index cc963b4c7..aa9ccca26 100644 --- a/test/dotnet-pack.Tests/PackTests.cs +++ b/test/dotnet-pack.Tests/PackTests.cs @@ -31,8 +31,8 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests CopyProjectToTempDir(sourceTestLibDir, testLibDir); var testProject = GetProjectPath(testLibDir); - var buildCommand = new PackCommand(testProject, configuration: "Test"); - var result = buildCommand.Execute(); + var packCommand = new PackCommand(testProject, configuration: "Test"); + var result = packCommand.Execute(); result.Should().Pass(); var outputDir = new DirectoryInfo(Path.Combine(testLibDir.Path, "bin", "Test")); @@ -52,8 +52,8 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests var outputDir = new DirectoryInfo(Path.Combine(testLibDir.Path, "bin2")); var testProject = GetProjectPath(testLibDir); - var buildCommand = new PackCommand(testProject, output: outputDir.FullName); - var result = buildCommand.Execute(); + var packCommand = new PackCommand(testProject, output: outputDir.FullName); + var result = packCommand.Execute(); result.Should().Pass(); outputDir.Should().Exist(); @@ -69,7 +69,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests var cmd = new PackCommand(Path.Combine(testInstance.TestRoot, Project.FileName), versionSuffix: "85"); cmd.Execute().Should().Pass(); - var output = Path.Combine(testInstance.TestRoot, "bin", "Debug", DefaultFramework, "TestLibraryWithConfiguration.dll"); + var output = Path.Combine(testInstance.TestRoot, "bin", "Debug", DefaultLibraryFramework, "TestLibraryWithConfiguration.dll"); var informationalVersion = PeReaderUtils.GetAssemblyAttributeValue(output, "AssemblyInformationalVersionAttribute"); informationalVersion.Should().NotBeNull(); @@ -92,7 +92,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests File.Exists(outputPackage).Should().BeTrue(outputPackage); var zip = ZipFile.Open(outputPackage, ZipArchiveMode.Read); - zip.Entries.Should().Contain(e => e.FullName == "lib/netstandardapp1.5/TestLibraryWithConfiguration.dll"); + zip.Entries.Should().Contain(e => e.FullName == "lib/netstandard1.5/TestLibraryWithConfiguration.dll"); } [Fact] @@ -109,13 +109,13 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests var outputPackage = Path.Combine(testInstance.TestRoot, "bin", "Debug", "LibraryWithOutputAssemblyName.1.0.0.nupkg"); File.Exists(outputPackage).Should().BeTrue(outputPackage); var zip = ZipFile.Open(outputPackage, ZipArchiveMode.Read); - zip.Entries.Should().Contain(e => e.FullName == "lib/netstandardapp1.5/MyLibrary.dll"); + zip.Entries.Should().Contain(e => e.FullName == "lib/netstandard1.5/MyLibrary.dll"); var symbolsPackage = Path.Combine(testInstance.TestRoot, "bin", "Debug", "LibraryWithOutputAssemblyName.1.0.0.symbols.nupkg"); File.Exists(symbolsPackage).Should().BeTrue(symbolsPackage); zip = ZipFile.Open(symbolsPackage, ZipArchiveMode.Read); - zip.Entries.Should().Contain(e => e.FullName == "lib/netstandardapp1.5/MyLibrary.dll"); - zip.Entries.Should().Contain(e => e.FullName == "lib/netstandardapp1.5/MyLibrary.pdb"); + zip.Entries.Should().Contain(e => e.FullName == "lib/netstandard1.5/MyLibrary.dll"); + zip.Entries.Should().Contain(e => e.FullName == "lib/netstandard1.5/MyLibrary.pdb"); } private void CopyProjectToTempDir(string projectDir, TempDirectory tempDir) diff --git a/test/dotnet-projectmodel-server.Tests/DthTests.cs b/test/dotnet-projectmodel-server.Tests/DthTests.cs index 1570ddf21..5e8e6e70c 100644 --- a/test/dotnet-projectmodel-server.Tests/DthTests.cs +++ b/test/dotnet-projectmodel-server.Tests/DthTests.cs @@ -75,7 +75,7 @@ namespace Microsoft.DotNet.ProjectModel.Server.Tests .AssertJArrayCount(2) .Select(f => f["ShortName"].Value()); - Assert.Contains("netstandardapp1.5", frameworkShortNames); + Assert.Contains("netcoreapp1.0", frameworkShortNames); Assert.Contains("dnx451", frameworkShortNames); } } diff --git a/test/dotnet-publish.Tests/PublishTests.cs b/test/dotnet-publish.Tests/PublishTests.cs index 4ddce0410..2227c5f9d 100644 --- a/test/dotnet-publish.Tests/PublishTests.cs +++ b/test/dotnet-publish.Tests/PublishTests.cs @@ -23,6 +23,40 @@ namespace Microsoft.DotNet.Tools.Publish.Tests _testProjectsRoot = Path.Combine(RepoRoot, "TestAssets", "TestProjects"); } + private static readonly dynamic[] CrossPublishTestData = new[] + { + new + { + Rid="centos.7-x64", + HostExtension="", + ExpectedArtifacts=new string[] { "libhostfxr.so", "libcoreclr.so", "libhostpolicy.so" } + }, + new + { + Rid="rhel.7.2-x64", + HostExtension="", + ExpectedArtifacts=new string[] { "libhostfxr.so", "libcoreclr.so", "libhostpolicy.so" } + }, + new + { + Rid="ubuntu.14.04-x64", + HostExtension="", + ExpectedArtifacts=new string[] { "libhostfxr.so", "libcoreclr.so", "libhostpolicy.so" } + }, + new + { + Rid="win7-x64", + HostExtension=".exe", + ExpectedArtifacts=new string[] { "hostfxr.dll", "coreclr.dll", "hostpolicy.dll" } + }, + new + { + Rid="osx.10.11-x64", + HostExtension="", + ExpectedArtifacts=new string[] { "libhostfxr.dylib", "libcoreclr.dylib", "libhostpolicy.dylib" } + } + }; + public static IEnumerable PublishOptions { get @@ -30,12 +64,12 @@ namespace Microsoft.DotNet.Tools.Publish.Tests return new[] { new object[] { "1", "", "", "", "" }, - new object[] { "2", "netstandardapp1.5", "", "", "" }, + new object[] { "2", "netcoreapp1.0", "", "", "" }, new object[] { "3", "", PlatformServices.Default.Runtime.GetLegacyRestoreRuntimeIdentifier(), "", "" }, new object[] { "4", "", "", "Release", "" }, new object[] { "5", "", "", "", "some/dir"}, new object[] { "6", "", "", "", "some/dir/with spaces" }, - new object[] { "7", "netstandardapp1.5", PlatformServices.Default.Runtime.GetLegacyRestoreRuntimeIdentifier(), "Debug", "some/dir" }, + new object[] { "7", "netcoreapp1.0", PlatformServices.Default.Runtime.GetLegacyRestoreRuntimeIdentifier(), "Debug", "some/dir" }, }; } } @@ -92,19 +126,13 @@ namespace Microsoft.DotNet.Tools.Publish.Tests publishCommand.Execute().Should().Fail(); } - [Theory] - [InlineData("centos.7-x64", "", new string[] { "libhostfxr.so", "libcoreclr.so", "libhostpolicy.so" })] - [InlineData("rhel.7.2-x64", "", new string[] { "libhostfxr.so", "libcoreclr.so", "libhostpolicy.so" })] - [InlineData("ubuntu.14.04-x64", "", new string[] { "libhostfxr.so", "libcoreclr.so", "libhostpolicy.so" })] - [InlineData("win7-x64", ".exe", new string[] { "hostfxr.dll", "coreclr.dll", "hostpolicy.dll" })] - [InlineData("osx.10.11-x64", "", new string[] { "libhostfxr.dylib", "libcoreclr.dylib", "libhostpolicy.dylib" })] - public void CrossPublishingSucceedsAndHasExpectedArtifacts(string rid, string hostExtension, string[] expectedArtifacts) + [Fact] + public void CrossPublishingSucceedsAndHasExpectedArtifacts() { var testNugetCache = "packages_cross_publish_test"; - TestInstance instance = GetTestGroupTestAssetsManager("CrossPublishTestProjects") - .CreateTestInstance("StandaloneAppCrossPublish"); + TestInstance instance = TestAssetsManager.CreateTestInstance(Path.Combine("PortableTests")); - var testProject = Path.Combine(instance.TestRoot, "project.json"); + var testProject = Path.Combine(instance.TestRoot, "StandaloneApp", "project.json"); var restoreCommand = new RestoreCommand(); @@ -112,23 +140,26 @@ namespace Microsoft.DotNet.Tools.Publish.Tests restoreCommand.Environment["NUGET_PACKAGES"] = testNugetCache; restoreCommand.Execute().Should().Pass(); - var buildCommand = new BuildCommand(testProject, runtime: rid); - - buildCommand.WorkingDirectory = Path.GetDirectoryName(testProject); - buildCommand.Environment["NUGET_PACKAGES"] = testNugetCache; - buildCommand.Execute().Should().Pass(); - - var publishCommand = new PublishCommand(testProject, runtime: rid, noBuild: true); - publishCommand.Environment["NUGET_PACKAGES"] = testNugetCache; - publishCommand.WorkingDirectory = Path.GetDirectoryName(testProject); - publishCommand.Execute().Should().Pass(); - - var publishedDir = publishCommand.GetOutputDirectory(); - publishedDir.Should().HaveFile("StandaloneAppCrossPublish"+ hostExtension); - - foreach (var artifact in expectedArtifacts) + foreach (var testData in CrossPublishTestData) { - publishedDir.Should().HaveFile(artifact); + var buildCommand = new BuildCommand(testProject, runtime: testData.Rid); + + buildCommand.WorkingDirectory = Path.GetDirectoryName(testProject); + buildCommand.Environment["NUGET_PACKAGES"] = testNugetCache; + buildCommand.Execute().Should().Pass(); + + var publishCommand = new PublishCommand(testProject, runtime: testData.Rid, noBuild: true); + publishCommand.Environment["NUGET_PACKAGES"] = testNugetCache; + publishCommand.WorkingDirectory = Path.GetDirectoryName(testProject); + publishCommand.Execute().Should().Pass(); + + var publishedDir = publishCommand.GetOutputDirectory(); + publishedDir.Should().HaveFile("StandaloneApp"+ testData.HostExtension); + + foreach (var artifact in testData.ExpectedArtifacts) + { + publishedDir.Should().HaveFile(artifact); + } } } @@ -147,12 +178,11 @@ namespace Microsoft.DotNet.Tools.Publish.Tests publishCommand.Execute().Should().Pass(); } - [Fact] - public void LibraryPublishTest() + [Fact(Skip="https://github.com/dotnet/cli/issues/2536")] + public void PublishedLibraryShouldOutputDependenciesAndNoHost() { TestInstance instance = TestAssetsManager.CreateTestInstance(Path.Combine("TestAppWithLibrary")) - .WithLockFiles() - .WithBuildArtifacts(); + .WithLockFiles(); var testProject = _getProjectJson(instance.TestRoot, "TestLibrary"); var publishCommand = new PublishCommand(testProject); @@ -165,7 +195,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests publishCommand.GetOutputDirectory().Should().HaveFile("System.Runtime.dll"); } - [WindowsOnlyFact] + [WindowsOnlyFact(Skip="https://github.com/dotnet/cli/issues/2536")] public void TestLibraryBindingRedirectGeneration() { TestInstance instance = TestAssetsManager.CreateTestInstance("TestBindingRedirectGeneration") @@ -186,7 +216,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests publishCommand.GetOutputDirectory().Should().HaveFile("Newtonsoft.Json.dll"); publishCommand.GetOutputDirectory().Delete(true); - publishCommand = new PublishCommand(lesserTestProject, "netstandardapp1.5", PlatformServices.Default.Runtime.GetLegacyRestoreRuntimeIdentifier()); + publishCommand = new PublishCommand(lesserTestProject, "netstandard1.5", PlatformServices.Default.Runtime.GetLegacyRestoreRuntimeIdentifier()); publishCommand.Execute().Should().Pass(); publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.dll"); diff --git a/test/dotnet-test.Tests/GivenThatWeWantToRunTestsInTheConsole.cs b/test/dotnet-test.Tests/GivenThatWeWantToRunTestsInTheConsole.cs index be0286aaf..df2de3e94 100644 --- a/test/dotnet-test.Tests/GivenThatWeWantToRunTestsInTheConsole.cs +++ b/test/dotnet-test.Tests/GivenThatWeWantToRunTestsInTheConsole.cs @@ -19,9 +19,8 @@ namespace Microsoft.Dotnet.Tools.Test.Tests public GivenThatWeWantToRunTestsInTheConsole() { - var testAssetManager = new TestAssetsManager(Path.Combine(RepoRoot, "TestAssets")); var testInstance = - testAssetManager.CreateTestInstance("ProjectWithTests", identifier: "ConsoleTests"); + TestAssetsManager.CreateTestInstance("ProjectWithTests", identifier: "ConsoleTests"); _projectFilePath = Path.Combine(testInstance.TestRoot, "project.json"); var contexts = ProjectContext.CreateContextForEachFramework( diff --git a/test/dotnet-test.Tests/GivenThatWeWantToUseDotnetTestE2EInDesignTime.cs b/test/dotnet-test.Tests/GivenThatWeWantToUseDotnetTestE2EInDesignTime.cs index 65ed16756..97024bf30 100644 --- a/test/dotnet-test.Tests/GivenThatWeWantToUseDotnetTestE2EInDesignTime.cs +++ b/test/dotnet-test.Tests/GivenThatWeWantToUseDotnetTestE2EInDesignTime.cs @@ -19,8 +19,7 @@ namespace Microsoft.Dotnet.Tools.Test.Tests public GivenThatWeWantToUseDotnetTestE2EInDesignTime() { - var testAssetManager = new TestAssetsManager(Path.Combine(RepoRoot, "TestAssets")); - var testInstance = testAssetManager.CreateTestInstance("ProjectWithTests"); + var testInstance = TestAssetsManager.CreateTestInstance("ProjectWithTests"); _projectFilePath = Path.Combine(testInstance.TestRoot, "project.json"); var contexts = ProjectContext.CreateContextForEachFramework( diff --git a/test/dotnet-test.UnitTests/GivenATestCommand.cs b/test/dotnet-test.UnitTests/GivenATestCommand.cs index 86555da1f..2d0e5c405 100644 --- a/test/dotnet-test.UnitTests/GivenATestCommand.cs +++ b/test/dotnet-test.UnitTests/GivenATestCommand.cs @@ -16,6 +16,7 @@ namespace Microsoft.Dotnet.Tools.Test.Tests private static readonly string ProjectJsonPath = Path.Combine( AppContext.BaseDirectory, "TestAssets", + "TestProjects", "ProjectWithTests", "project.json"); diff --git a/test/dotnet-test.UnitTests/GivenThatWeWantToParseArgumentsForDotnetTest.cs b/test/dotnet-test.UnitTests/GivenThatWeWantToParseArgumentsForDotnetTest.cs index 202ee4ea3..263db144c 100644 --- a/test/dotnet-test.UnitTests/GivenThatWeWantToParseArgumentsForDotnetTest.cs +++ b/test/dotnet-test.UnitTests/GivenThatWeWantToParseArgumentsForDotnetTest.cs @@ -12,7 +12,7 @@ namespace Microsoft.Dotnet.Tools.Test.Tests public class GivenThatWeWantToParseArgumentsForDotnetTest { private const string ProjectJson = "project.json"; - private const string Framework = "netstandardapp1.5"; + private const string Framework = "netcoreapp1.0"; private const string Output = "some output"; private const string BuildBasePath = "some build base path"; private const string Config = "some config"; @@ -108,7 +108,7 @@ namespace Microsoft.Dotnet.Tools.Test.Tests [Fact] public void It_converts_the_framework_to_NugetFramework() { - _dotnetTestFullParams.Framework.DotNetFrameworkName.Should().Be(".NETStandardApp,Version=v1.5"); + _dotnetTestFullParams.Framework.DotNetFrameworkName.Should().Be(".NETCoreApp,Version=v1.0"); } [Fact] diff --git a/test/dotnet-test.UnitTests/project.json b/test/dotnet-test.UnitTests/project.json index 108ef4257..351836583 100644 --- a/test/dotnet-test.UnitTests/project.json +++ b/test/dotnet-test.UnitTests/project.json @@ -28,7 +28,7 @@ } }, "content": [ - "../../TestAssets/ProjectWithTests/project.json" + "../../TestAssets/TestProjects/ProjectWithTests/project.json" ], "testRunner": "xunit" } diff --git a/test/dotnet.Tests/PackagedCommandTests.cs b/test/dotnet.Tests/PackagedCommandTests.cs index 152a2c284..fb425e342 100644 --- a/test/dotnet.Tests/PackagedCommandTests.cs +++ b/test/dotnet.Tests/PackagedCommandTests.cs @@ -90,7 +90,7 @@ namespace Microsoft.DotNet.Tests var projectOutputPath = $"AppWithDirectDependencyDesktopAndPortable\\bin\\Debug\\net451\\{rid}\\dotnet-desktop-and-portable.exe"; return new[] { - new object[] { ".NETStandard,Version=v1.5", "CoreFX", "lib\\netstandard1.5\\dotnet-desktop-and-portable.dll" }, + new object[] { ".NETCoreApp,Version=v1.0", "CoreFX", "lib\\netcoreapp1.0\\dotnet-desktop-and-portable.dll" }, new object[] { ".NETFramework,Version=v4.5.1", "NetFX", projectOutputPath } }; }