From 3a4e23e373fde992abbdaf6df8ddfa3ed50885f5 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Wed, 4 Jan 2017 14:17:43 -0800 Subject: [PATCH 1/5] Updating the SDK to an SDK that includes globing for source and resources implicitly. --- .../AppWithProjTool2Fx/App.csproj | 6 +- .../AppWithRedirectsAndConfig.csproj | 3 - .../AppWithRedirectsNoConfig.csproj | 3 - .../LibWithProjTool2Fx/Lib.csproj | 6 +- .../AppWithNonExistingToolDependency.csproj | 5 - .../EmptyItemGroup/EmptyItemGroup.csproj | 5 +- .../DotnetAddP2PProjects/Lib/Lib.csproj | 5 +- .../DotnetAddP2PProjects/MoreThanOne/a.csproj | 4 - .../DotnetAddP2PProjects/MoreThanOne/b.csproj | 4 - .../Net452AndNetCoreApp10Lib.csproj | 4 - .../Net45Lib/Net45Lib.csproj | 4 - .../ValidRef/ValidRef.csproj | 4 - .../WithDoubledRef/WithDoubledRef.csproj | 4 - .../WithExistingRefCondOnItem.csproj | 4 - .../WithExistingRefCondWhitespaces.csproj | 4 - .../WithRefCondNonUniform.csproj | 4 - .../WithRefNoCondNonUniform.csproj | 4 - .../TestApp/Existing.csproj | 5 - ...ectWithUnresolvedPlatformDependency.csproj | 5 - .../AppWithDepOnTool/AppWithDepOnTool.csproj | 5 - .../ToolWithRandomPackageName.csproj | 2 - .../AppWithDepOnToolWithOutputName.csproj | 6 +- .../AppWithDirectAndToolDep.csproj | 6 +- .../AppWithDirectDep/AppWithDirectDep.csproj | 6 +- .../AppWithDirectDepWithOutputName.csproj | 6 +- ...ldAppWithMultipleFrameworksAndTools.csproj | 4 - .../AppWithToolDependency.csproj | 6 +- .../DependencyContextFromTool.csproj | 6 +- .../InvalidSolution/Lib/Lib.csproj | 4 - .../MyLibrary.csproj | 6 +- .../MSBuildAppWithMultipleFrameworks.csproj | 4 - ...ldAppWithMultipleFrameworksAndTools.csproj | 4 - .../MSBuildTestApp/MSBuildTestApp.csproj | 4 - .../CsprojLibrary1/CsprojLibrary1.csproj | 2 - .../CsprojLibrary2/CsprojLibrary2.csproj | 2 - .../CsprojLibrary3/CsprojLibrary3.csproj | 2 - .../TestAppSimple/TestAppSimple.csproj | 5 - .../TestAppWithEmptySln/App/App.csproj | 4 - .../TestAppWithEmptySln/Lib/Lib.csproj | 4 - .../App/App.csproj | 4 - .../TestAppWithProjDepTool.csproj | 4 - .../App/App.csproj | 4 - .../Lib/Lib.csproj | 4 - .../App/App.csproj | 4 - .../Lib/Lib.csproj | 4 - .../App/App.csproj | 4 - .../Lib/Lib.csproj | 4 - .../App/App.csproj | 4 - .../Lib/Lib.csproj | 4 - .../Lib/Lib.csproj | 4 - .../TestLibraryWithConfiguration.csproj | 6 +- .../VSTestDesktopAndNetCore.csproj | 4 - .../VSTestDotNetCore/VSTestDotNetCore.csproj | 4 - .../VSTestXunitDesktopAndNetCore.csproj | 4 - .../VSTestXunitDotNetCore.csproj | 5 - ...rosoft.DotNet.Cli.DependencyVersions.props | 4 +- .../Rules/MigrateBuildOptionsRule.cs | 91 ++++--------------- .../CSharp_Console/$projectName$.csproj | 5 - .../CSharp_Lib/$projectName$.csproj | 5 - .../CSharp_Mstest/$projectName$.csproj | 5 - .../CSharp_Xunittest/$projectName$.csproj | 5 - .../FSharp_Console/$projectName$.fsproj | 1 + .../FSharp_Lib/$projectName$.fsproj | 1 + .../FSharp_Mstest/$projectName$.fsproj | 1 + .../FSharp_Web/$projectName$.fsproj | 1 + .../FSharp_Xunittest/$projectName$.fsproj | 1 + .../GivenThatIWantToMigrateBuildOptions.cs | 24 +++-- 67 files changed, 55 insertions(+), 327 deletions(-) diff --git a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj index 18f187327..a5487baba 100644 --- a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj +++ b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj @@ -5,11 +5,7 @@ $(PackageTargetFallback);portable-net45+win8;dnxcore50 win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64 - - - - - + 1.0.0-* diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj index caa3e334c..35f2ba2b2 100644 --- a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj +++ b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj @@ -7,10 +7,7 @@ - - - diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj index 41d5e98eb..dd8d8b537 100644 --- a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj +++ b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj @@ -7,10 +7,7 @@ - - - diff --git a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj index 3a0dc74db..e621006e9 100644 --- a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj +++ b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj @@ -4,11 +4,7 @@ Library $(PackageTargetFallback);portable-net45+win8;dnxcore50;netcoreapp1.0 - - - - - + 1.0.0-* diff --git a/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/AppWithNonExistingToolDependency.csproj b/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/AppWithNonExistingToolDependency.csproj index 52a2e1bb3..f36c1bf2b 100644 --- a/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/AppWithNonExistingToolDependency.csproj +++ b/TestAssets/NonRestoredTestProjects/AppWithNonExistingToolDependency/AppWithNonExistingToolDependency.csproj @@ -5,11 +5,6 @@ netcoreapp1.0 - - - - - diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.csproj index 14444c540..5815b4190 100644 --- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.csproj +++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/EmptyItemGroup/EmptyItemGroup.csproj @@ -3,10 +3,7 @@ Library net451;netcoreapp1.0 - - - - + 1.0.3 diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.csproj index 06bd0d84e..51f727a05 100644 --- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.csproj +++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Lib/Lib.csproj @@ -3,10 +3,7 @@ Library net451;netcoreapp1.0;netstandard1.4 - - - - + 1.0.3 diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/a.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/a.csproj index 8f4d18661..a7277eb65 100644 --- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/a.csproj +++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/a.csproj @@ -3,10 +3,6 @@ Library netcoreapp1.0 - - - - 1.0.3 diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/b.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/b.csproj index 8f4d18661..a7277eb65 100644 --- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/b.csproj +++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/MoreThanOne/b.csproj @@ -3,10 +3,6 @@ Library netcoreapp1.0 - - - - 1.0.3 diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.csproj index 8775ff282..6e627ad42 100644 --- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.csproj +++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net452AndNetCoreApp10Lib/Net452AndNetCoreApp10Lib.csproj @@ -3,10 +3,6 @@ Library net452;netcoreapp1.0 - - - - 1.0.3 diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net45Lib/Net45Lib.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net45Lib/Net45Lib.csproj index e8974ba66..96073b2c7 100644 --- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net45Lib/Net45Lib.csproj +++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/Net45Lib/Net45Lib.csproj @@ -3,10 +3,6 @@ Library net45 - - - - 1.0.3 diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.csproj index 06bd0d84e..044fe40ef 100644 --- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.csproj +++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/ValidRef/ValidRef.csproj @@ -3,10 +3,6 @@ Library net451;netcoreapp1.0;netstandard1.4 - - - - 1.0.3 diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.csproj index 41130b8fd..09b0759f1 100644 --- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.csproj +++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithDoubledRef/WithDoubledRef.csproj @@ -3,10 +3,6 @@ Library net451;netcoreapp1.0 - - - - 1.0.3 diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.csproj index f686b12f9..0464c2816 100644 --- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.csproj +++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondOnItem/WithExistingRefCondOnItem.csproj @@ -3,10 +3,6 @@ Library net451;netcoreapp1.0 - - - - 1.0.3 diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.csproj index 494947536..949805ccc 100644 --- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.csproj +++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithExistingRefCondWhitespaces/WithExistingRefCondWhitespaces.csproj @@ -3,10 +3,6 @@ Library net451;netcoreapp1.0 - - - - 1.0.3 diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefCondNonUniform/WithRefCondNonUniform.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefCondNonUniform/WithRefCondNonUniform.csproj index d64795816..ebf9b12ee 100644 --- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefCondNonUniform/WithRefCondNonUniform.csproj +++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefCondNonUniform/WithRefCondNonUniform.csproj @@ -3,10 +3,6 @@ Library net451;netcoreapp1.0 - - - - 1.0.3 diff --git a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.csproj b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.csproj index 13db1518f..370bc5873 100644 --- a/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.csproj +++ b/TestAssets/NonRestoredTestProjects/DotnetAddP2PProjects/WithRefNoCondNonUniform/WithRefNoCondNonUniform.csproj @@ -3,10 +3,6 @@ Library net451;netcoreapp1.0 - - - - 1.0.3 diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefsAndUnrelatedCsproj/TestApp/Existing.csproj b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefsAndUnrelatedCsproj/TestApp/Existing.csproj index 322e07f8d..2f78a7e02 100644 --- a/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefsAndUnrelatedCsproj/TestApp/Existing.csproj +++ b/TestAssets/NonRestoredTestProjects/PJAppWithSlnAndXprojRefsAndUnrelatedCsproj/TestApp/Existing.csproj @@ -4,11 +4,6 @@ netstandard1.4 - - - - - diff --git a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/TestProjectWithUnresolvedPlatformDependency.csproj b/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/TestProjectWithUnresolvedPlatformDependency.csproj index 7ad98ec11..890428162 100755 --- a/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/TestProjectWithUnresolvedPlatformDependency.csproj +++ b/TestAssets/NonRestoredTestProjects/TestProjectWithUnresolvedPlatformDependency/TestProjectWithUnresolvedPlatformDependency.csproj @@ -4,11 +4,6 @@ Exe $(PackageTargetFallback);dnxcore50 - - - - - 1.0.0 diff --git a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/AppWithDepOnTool.csproj b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/AppWithDepOnTool.csproj index 5081ad676..de60f199d 100644 --- a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/AppWithDepOnTool.csproj +++ b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/AppWithDepOnTool/AppWithDepOnTool.csproj @@ -6,11 +6,6 @@ random-name - - - - - diff --git a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj index 6889d77cc..f62a21477 100644 --- a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj +++ b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj @@ -9,8 +9,6 @@ - - true lib\$(TargetFramework) diff --git a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj b/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj index e34b312d0..1c2ecdf95 100755 --- a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj +++ b/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj @@ -3,11 +3,7 @@ netcoreapp1.0 Exe - - - - - + 1.0.3 diff --git a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj b/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj index d19694771..fe4c0e02c 100755 --- a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj +++ b/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj @@ -3,11 +3,7 @@ netcoreapp1.0 Exe - - - - - + 1.0.3 diff --git a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj b/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj index 1541e8f30..bbfb9be11 100755 --- a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj +++ b/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj @@ -14,11 +14,7 @@ 1.0.0 - - - - - + $(DefineConstants);RELEASE;TRACE true diff --git a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj b/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj index 2f8011dee..877cce870 100755 --- a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj +++ b/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj @@ -3,11 +3,7 @@ netcoreapp1.0 Exe - - - - - + 1.0.0 diff --git a/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj b/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj index 51a5fe2ab..8c58766c2 100644 --- a/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj +++ b/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj @@ -21,8 +21,4 @@ - - - - \ No newline at end of file diff --git a/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj b/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj index 44672b914..a31d87934 100755 --- a/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj +++ b/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj @@ -3,11 +3,7 @@ netcoreapp1.0 Exe - - - - - + 1.0.3 diff --git a/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj b/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj index b9dfef9b9..6a76893df 100755 --- a/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj +++ b/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj @@ -7,11 +7,7 @@ false $(PackageTargetFallback);dnxcore50;portable-net45+win8 - - - - - + 1.0.3 diff --git a/TestAssets/TestProjects/InvalidSolution/Lib/Lib.csproj b/TestAssets/TestProjects/InvalidSolution/Lib/Lib.csproj index f47b49f65..9f8bcbb51 100644 --- a/TestAssets/TestProjects/InvalidSolution/Lib/Lib.csproj +++ b/TestAssets/TestProjects/InvalidSolution/Lib/Lib.csproj @@ -4,10 +4,6 @@ netstandard1.4 - - - - diff --git a/TestAssets/TestProjects/LibraryWithOutputAssemblyName/MyLibrary.csproj b/TestAssets/TestProjects/LibraryWithOutputAssemblyName/MyLibrary.csproj index 411f7c65b..529d3f399 100755 --- a/TestAssets/TestProjects/LibraryWithOutputAssemblyName/MyLibrary.csproj +++ b/TestAssets/TestProjects/LibraryWithOutputAssemblyName/MyLibrary.csproj @@ -2,11 +2,7 @@ netstandard1.5 - - - - - + 1.6.0 diff --git a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/MSBuildAppWithMultipleFrameworks.csproj b/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/MSBuildAppWithMultipleFrameworks.csproj index 92df3195d..1125a1669 100644 --- a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/MSBuildAppWithMultipleFrameworks.csproj +++ b/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworks/MSBuildAppWithMultipleFrameworks.csproj @@ -10,8 +10,4 @@ - - - - \ No newline at end of file diff --git a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworksAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj b/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworksAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj index 51a5fe2ab..8c58766c2 100644 --- a/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworksAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj +++ b/TestAssets/TestProjects/MSBuildAppWithMultipleFrameworksAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj @@ -21,8 +21,4 @@ - - - - \ No newline at end of file diff --git a/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj b/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj index 9829c68cb..9713f8d67 100644 --- a/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj +++ b/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj @@ -5,10 +5,6 @@ win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64 - - - - 1.0.3 diff --git a/TestAssets/TestProjects/TestAppDependencyGraph/CsprojLibrary1/CsprojLibrary1.csproj b/TestAssets/TestProjects/TestAppDependencyGraph/CsprojLibrary1/CsprojLibrary1.csproj index 06471fc11..90ed848e5 100644 --- a/TestAssets/TestProjects/TestAppDependencyGraph/CsprojLibrary1/CsprojLibrary1.csproj +++ b/TestAssets/TestProjects/TestAppDependencyGraph/CsprojLibrary1/CsprojLibrary1.csproj @@ -7,8 +7,6 @@ - - diff --git a/TestAssets/TestProjects/TestAppDependencyGraph/CsprojLibrary2/CsprojLibrary2.csproj b/TestAssets/TestProjects/TestAppDependencyGraph/CsprojLibrary2/CsprojLibrary2.csproj index 06471fc11..90ed848e5 100644 --- a/TestAssets/TestProjects/TestAppDependencyGraph/CsprojLibrary2/CsprojLibrary2.csproj +++ b/TestAssets/TestProjects/TestAppDependencyGraph/CsprojLibrary2/CsprojLibrary2.csproj @@ -7,8 +7,6 @@ - - diff --git a/TestAssets/TestProjects/TestAppDependencyGraph/CsprojLibrary3/CsprojLibrary3.csproj b/TestAssets/TestProjects/TestAppDependencyGraph/CsprojLibrary3/CsprojLibrary3.csproj index 06471fc11..90ed848e5 100644 --- a/TestAssets/TestProjects/TestAppDependencyGraph/CsprojLibrary3/CsprojLibrary3.csproj +++ b/TestAssets/TestProjects/TestAppDependencyGraph/CsprojLibrary3/CsprojLibrary3.csproj @@ -7,8 +7,6 @@ - - diff --git a/TestAssets/TestProjects/TestAppSimple/TestAppSimple.csproj b/TestAssets/TestProjects/TestAppSimple/TestAppSimple.csproj index e2ebb85cc..365778100 100755 --- a/TestAssets/TestProjects/TestAppSimple/TestAppSimple.csproj +++ b/TestAssets/TestProjects/TestAppSimple/TestAppSimple.csproj @@ -3,11 +3,6 @@ netcoreapp1.0 Exe - - - - - 1.0.3 diff --git a/TestAssets/TestProjects/TestAppWithEmptySln/App/App.csproj b/TestAssets/TestProjects/TestAppWithEmptySln/App/App.csproj index 27e43f08e..dbec1b003 100644 --- a/TestAssets/TestProjects/TestAppWithEmptySln/App/App.csproj +++ b/TestAssets/TestProjects/TestAppWithEmptySln/App/App.csproj @@ -4,10 +4,6 @@ netcoreapp1.0 - - - - diff --git a/TestAssets/TestProjects/TestAppWithEmptySln/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithEmptySln/Lib/Lib.csproj index f47b49f65..9f8bcbb51 100644 --- a/TestAssets/TestProjects/TestAppWithEmptySln/Lib/Lib.csproj +++ b/TestAssets/TestProjects/TestAppWithEmptySln/Lib/Lib.csproj @@ -4,10 +4,6 @@ netstandard1.4 - - - - diff --git a/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/App.csproj b/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/App.csproj index 920e2a206..5ea4163e5 100644 --- a/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/App.csproj +++ b/TestAssets/TestProjects/TestAppWithMultipleSlnFiles/App/App.csproj @@ -4,10 +4,6 @@ netcoreapp1.0 - - - - diff --git a/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj b/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj index 5b481ea7e..f252d7975 100644 --- a/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj +++ b/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj @@ -4,10 +4,6 @@ netcoreapp1.0 - - - - 1.0.3 diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/App.csproj index 27e43f08e..dbec1b003 100644 --- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/App.csproj +++ b/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/App/App.csproj @@ -4,10 +4,6 @@ netcoreapp1.0 - - - - diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/Lib/Lib.csproj index f47b49f65..9f8bcbb51 100644 --- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/Lib/Lib.csproj +++ b/TestAssets/TestProjects/TestAppWithSlnAndCsprojFiles/Lib/Lib.csproj @@ -4,10 +4,6 @@ netstandard1.4 - - - - diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/App.csproj index 27e43f08e..dbec1b003 100644 --- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/App.csproj +++ b/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/App/App.csproj @@ -4,10 +4,6 @@ netcoreapp1.0 - - - - diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/Lib/Lib.csproj index aacaac752..4a0fd46d5 100644 --- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/Lib/Lib.csproj +++ b/TestAssets/TestProjects/TestAppWithSlnAndCsprojProjectGuidFiles/Lib/Lib.csproj @@ -5,10 +5,6 @@ {84A45D44-B677-492D-A6DA-B3A71135AB8E} - - - - diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/App.csproj index 920e2a206..5ea4163e5 100644 --- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/App.csproj +++ b/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/App/App.csproj @@ -4,10 +4,6 @@ netcoreapp1.0 - - - - diff --git a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/Lib/Lib.csproj index f47b49f65..9f8bcbb51 100644 --- a/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/Lib/Lib.csproj +++ b/TestAssets/TestProjects/TestAppWithSlnAndCsprojToRemove/Lib/Lib.csproj @@ -4,10 +4,6 @@ netstandard1.4 - - - - diff --git a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/App.csproj b/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/App.csproj index 27e43f08e..dbec1b003 100644 --- a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/App.csproj +++ b/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/App/App.csproj @@ -4,10 +4,6 @@ netcoreapp1.0 - - - - diff --git a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/Lib/Lib.csproj index f47b49f65..9f8bcbb51 100644 --- a/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/Lib/Lib.csproj +++ b/TestAssets/TestProjects/TestAppWithSlnAndDuplicateProjectReferences/Lib/Lib.csproj @@ -4,10 +4,6 @@ netstandard1.4 - - - - diff --git a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/Lib/Lib.csproj b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/Lib/Lib.csproj index f47b49f65..9f8bcbb51 100644 --- a/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/Lib/Lib.csproj +++ b/TestAssets/TestProjects/TestAppWithSlnAndExistingCsprojReferences/Lib/Lib.csproj @@ -4,10 +4,6 @@ netstandard1.4 - - - - diff --git a/TestAssets/TestProjects/TestLibraryWithConfiguration/TestLibraryWithConfiguration.csproj b/TestAssets/TestProjects/TestLibraryWithConfiguration/TestLibraryWithConfiguration.csproj index f922f23b3..4924ce508 100755 --- a/TestAssets/TestProjects/TestLibraryWithConfiguration/TestLibraryWithConfiguration.csproj +++ b/TestAssets/TestProjects/TestLibraryWithConfiguration/TestLibraryWithConfiguration.csproj @@ -4,11 +4,7 @@ $(NoWarn);CS1591 true - - - - - + 1.6.0 diff --git a/TestAssets/TestProjects/VSTestDesktopAndNetCore/VSTestDesktopAndNetCore.csproj b/TestAssets/TestProjects/VSTestDesktopAndNetCore/VSTestDesktopAndNetCore.csproj index caf2ed4f1..7c765ff51 100644 --- a/TestAssets/TestProjects/VSTestDesktopAndNetCore/VSTestDesktopAndNetCore.csproj +++ b/TestAssets/TestProjects/VSTestDesktopAndNetCore/VSTestDesktopAndNetCore.csproj @@ -9,10 +9,6 @@ DESKTOP;$(DefineConstants) - - - - 1.0.3 diff --git a/TestAssets/TestProjects/VSTestDotNetCore/VSTestDotNetCore.csproj b/TestAssets/TestProjects/VSTestDotNetCore/VSTestDotNetCore.csproj index f6738bb9b..97230db7a 100644 --- a/TestAssets/TestProjects/VSTestDotNetCore/VSTestDotNetCore.csproj +++ b/TestAssets/TestProjects/VSTestDotNetCore/VSTestDotNetCore.csproj @@ -5,10 +5,6 @@ netcoreapp1.0 - - - - 1.0.3 diff --git a/TestAssets/TestProjects/VSTestXunitDesktopAndNetCore/VSTestXunitDesktopAndNetCore.csproj b/TestAssets/TestProjects/VSTestXunitDesktopAndNetCore/VSTestXunitDesktopAndNetCore.csproj index 6be4c03f1..758ab76c2 100644 --- a/TestAssets/TestProjects/VSTestXunitDesktopAndNetCore/VSTestXunitDesktopAndNetCore.csproj +++ b/TestAssets/TestProjects/VSTestXunitDesktopAndNetCore/VSTestXunitDesktopAndNetCore.csproj @@ -11,10 +11,6 @@ DESKTOP;$(DefineConstants) - - - - 1.0.3 diff --git a/TestAssets/TestProjects/VSTestXunitDotNetCore/VSTestXunitDotNetCore.csproj b/TestAssets/TestProjects/VSTestXunitDotNetCore/VSTestXunitDotNetCore.csproj index a4db5ef95..491c84b0b 100644 --- a/TestAssets/TestProjects/VSTestXunitDotNetCore/VSTestXunitDotNetCore.csproj +++ b/TestAssets/TestProjects/VSTestXunitDotNetCore/VSTestXunitDotNetCore.csproj @@ -5,11 +5,6 @@ netcoreapp1.0 - - - - - 1.0.3 diff --git a/build/Microsoft.DotNet.Cli.DependencyVersions.props b/build/Microsoft.DotNet.Cli.DependencyVersions.props index b5f1c45df..5f758a72e 100644 --- a/build/Microsoft.DotNet.Cli.DependencyVersions.props +++ b/build/Microsoft.DotNet.Cli.DependencyVersions.props @@ -2,8 +2,8 @@ 15.1.0-preview-000458-02 - 1.0.0-alpha-20161230-1 - 1.0.0-alpha-20161205-1-154 + 1.0.0-alpha-20170104-3 + 1.0.0-alpha-20170104-1-189 15.0.0-preview-20161227-02 diff --git a/src/Microsoft.DotNet.ProjectJsonMigration/Rules/MigrateBuildOptionsRule.cs b/src/Microsoft.DotNet.ProjectJsonMigration/Rules/MigrateBuildOptionsRule.cs index f5e54155e..88a404e25 100644 --- a/src/Microsoft.DotNet.ProjectJsonMigration/Rules/MigrateBuildOptionsRule.cs +++ b/src/Microsoft.DotNet.ProjectJsonMigration/Rules/MigrateBuildOptionsRule.cs @@ -111,10 +111,10 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Rules compilerOptions => compilerOptions.OutputName != null); private IncludeContextTransform CompileFilesTransform => - new IncludeContextTransform("Compile", transformMappings: false); + new IncludeContextTransform("Compile", false, ic => ic != null); private IncludeContextTransform EmbedFilesTransform => - new IncludeContextTransform("EmbeddedResource", transformMappings: false); + new IncludeContextTransform("EmbeddedResource", false, ic => ic != null); private IncludeContextTransform CopyToOutputFilesTransform => new IncludeContextTransform("Content", transformMappings: true) @@ -139,11 +139,11 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Rules private Func>CompileFilesTransformExecute => (compilerOptions, projectDirectory, projectType) => - CompileFilesTransform.Transform(GetCompileIncludeContext(compilerOptions, projectDirectory)); + CompileFilesTransform.Transform(compilerOptions.CompileInclude); private Func> EmbedFilesTransformExecute => (compilerOptions, projectDirectory, projectType) => - EmbedFilesTransform.Transform(GetEmbedIncludeContext(compilerOptions, projectDirectory)); + EmbedFilesTransform.Transform(GetEmbedIncludeContext(compilerOptions)); private Func> CopyToOutputFilesTransformExecute => (compilerOptions, projectDirectory, projectType) => @@ -298,12 +298,11 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Rules var configurationOutput = includeContextTransformExecute(configurationCompilerOptions, projectDirectory, projectType); - configurationOutput = RemoveDefaultCompileAndEmbeddedResourceForWebProjects( - configurationOutput, - projectType, - csproj); - transformApplicator.Execute(configurationOutput, itemGroup, mergeExisting: true); + if (configurationOutput != null) + { + transformApplicator.Execute(configurationOutput, itemGroup, mergeExisting: true); + } } } @@ -353,39 +352,17 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Rules foreach (var includeContextTransformExecute in _includeContextTransformExecutes) { var transform = includeContextTransformExecute(compilerOptions, projectDirectory, projectType); - - transform = RemoveDefaultCompileAndEmbeddedResourceForWebProjects( - transform, - projectType, - csproj); - transformApplicator.Execute( - transform, - itemGroup, - mergeExisting: true); + if (transform != null) + { + transformApplicator.Execute( + transform, + itemGroup, + mergeExisting: true); + } } } - private IEnumerable RemoveDefaultCompileAndEmbeddedResourceForWebProjects( - IEnumerable transform, - ProjectType projectType, - ProjectRootElement csproj) - { - if(projectType == ProjectType.Web) - { - var itemsToRemove = transform.Where(p => - p != null && - p.Include.Contains("**\\*") && - (p.ItemType == "Compile" || p.ItemType == "EmbeddedResource")); - - CleanExistingItems(csproj, new [] {"Compile", "EmbeddedResource"}); - - transform = transform.Where(p => !itemsToRemove.Contains(p)); - } - - return transform; - } - private void CleanExistingProperties(ProjectRootElement csproj) { var existingPropertiesToRemove = new [] {"OutputType", "TargetExt"}; @@ -401,43 +378,11 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Rules } } - private void CleanExistingItems(ProjectRootElement csproj, IEnumerable itemsToRemove) + private IncludeContext GetEmbedIncludeContext(CommonCompilerOptions compilerOptions) { - foreach (var itemName in itemsToRemove) - { - var items = csproj.Items.Where(i => i.ItemType == itemName); + var embedIncludeContext = compilerOptions.EmbedInclude; - foreach (var item in items) - { - item.Parent.RemoveChild(item); - } - } - } - - private IncludeContext GetCompileIncludeContext(CommonCompilerOptions compilerOptions, string projectDirectory) - { - // Defaults from src/Microsoft.DotNet.ProjectModel/ProjectReader.cs #L596 - return compilerOptions.CompileInclude ?? - new IncludeContext( - projectDirectory, - "compile", - new JObject(), - ProjectFilesCollection.DefaultCompileBuiltInPatterns, - DefaultEmptyExcludeOption); - } - - private IncludeContext GetEmbedIncludeContext(CommonCompilerOptions compilerOptions, string projectDirectory) - { - // Defaults from src/Microsoft.DotNet.ProjectModel/ProjectReader.cs #L602 - var embedIncludeContext = compilerOptions.EmbedInclude ?? - new IncludeContext( - projectDirectory, - "embed", - new JObject(), - ProjectFilesCollection.DefaultResourcesBuiltInPatterns, - DefaultEmptyExcludeOption); - - embedIncludeContext.BuiltInsExclude.Add("@(EmbeddedResource)"); + embedIncludeContext?.BuiltInsExclude.Add("@(EmbeddedResource)"); return embedIncludeContext; } diff --git a/src/dotnet/commands/dotnet-new/CSharp_Console/$projectName$.csproj b/src/dotnet/commands/dotnet-new/CSharp_Console/$projectName$.csproj index 17afcf83e..0161faaf7 100755 --- a/src/dotnet/commands/dotnet-new/CSharp_Console/$projectName$.csproj +++ b/src/dotnet/commands/dotnet-new/CSharp_Console/$projectName$.csproj @@ -5,11 +5,6 @@ netcoreapp1.0 - - - - - diff --git a/src/dotnet/commands/dotnet-new/CSharp_Lib/$projectName$.csproj b/src/dotnet/commands/dotnet-new/CSharp_Lib/$projectName$.csproj index 322e07f8d..2f78a7e02 100755 --- a/src/dotnet/commands/dotnet-new/CSharp_Lib/$projectName$.csproj +++ b/src/dotnet/commands/dotnet-new/CSharp_Lib/$projectName$.csproj @@ -4,11 +4,6 @@ netstandard1.4 - - - - - diff --git a/src/dotnet/commands/dotnet-new/CSharp_Mstest/$projectName$.csproj b/src/dotnet/commands/dotnet-new/CSharp_Mstest/$projectName$.csproj index fb82ed249..2882e5f0a 100644 --- a/src/dotnet/commands/dotnet-new/CSharp_Mstest/$projectName$.csproj +++ b/src/dotnet/commands/dotnet-new/CSharp_Mstest/$projectName$.csproj @@ -5,11 +5,6 @@ netcoreapp1.0 - - - - - diff --git a/src/dotnet/commands/dotnet-new/CSharp_Xunittest/$projectName$.csproj b/src/dotnet/commands/dotnet-new/CSharp_Xunittest/$projectName$.csproj index e04d58dd5..c84c426ce 100644 --- a/src/dotnet/commands/dotnet-new/CSharp_Xunittest/$projectName$.csproj +++ b/src/dotnet/commands/dotnet-new/CSharp_Xunittest/$projectName$.csproj @@ -5,11 +5,6 @@ netcoreapp1.0 - - - - - diff --git a/src/dotnet/commands/dotnet-new/FSharp_Console/$projectName$.fsproj b/src/dotnet/commands/dotnet-new/FSharp_Console/$projectName$.fsproj index 525b81f9c..a564e5fd1 100644 --- a/src/dotnet/commands/dotnet-new/FSharp_Console/$projectName$.fsproj +++ b/src/dotnet/commands/dotnet-new/FSharp_Console/$projectName$.fsproj @@ -4,6 +4,7 @@ Exe netcoreapp1.0 1.0.0-alpha + false diff --git a/src/dotnet/commands/dotnet-new/FSharp_Lib/$projectName$.fsproj b/src/dotnet/commands/dotnet-new/FSharp_Lib/$projectName$.fsproj index f12243115..28b8ccebe 100644 --- a/src/dotnet/commands/dotnet-new/FSharp_Lib/$projectName$.fsproj +++ b/src/dotnet/commands/dotnet-new/FSharp_Lib/$projectName$.fsproj @@ -3,6 +3,7 @@ netstandard1.6 1.0.0-alpha + false diff --git a/src/dotnet/commands/dotnet-new/FSharp_Mstest/$projectName$.fsproj b/src/dotnet/commands/dotnet-new/FSharp_Mstest/$projectName$.fsproj index 2f9bd9e51..265b668a0 100644 --- a/src/dotnet/commands/dotnet-new/FSharp_Mstest/$projectName$.fsproj +++ b/src/dotnet/commands/dotnet-new/FSharp_Mstest/$projectName$.fsproj @@ -3,6 +3,7 @@ Exe netcoreapp1.0 + false diff --git a/src/dotnet/commands/dotnet-new/FSharp_Web/$projectName$.fsproj b/src/dotnet/commands/dotnet-new/FSharp_Web/$projectName$.fsproj index e95a6c0a1..622dabb4d 100644 --- a/src/dotnet/commands/dotnet-new/FSharp_Web/$projectName$.fsproj +++ b/src/dotnet/commands/dotnet-new/FSharp_Web/$projectName$.fsproj @@ -4,6 +4,7 @@ Exe netcoreapp1.0 true + false diff --git a/src/dotnet/commands/dotnet-new/FSharp_Xunittest/$projectName$.fsproj b/src/dotnet/commands/dotnet-new/FSharp_Xunittest/$projectName$.fsproj index de838f1e6..35db92034 100644 --- a/src/dotnet/commands/dotnet-new/FSharp_Xunittest/$projectName$.fsproj +++ b/src/dotnet/commands/dotnet-new/FSharp_Xunittest/$projectName$.fsproj @@ -3,6 +3,7 @@ Exe netcoreapp1.0 + false diff --git a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateBuildOptions.cs b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateBuildOptions.cs index 193c9fe12..81d245811 100644 --- a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateBuildOptions.cs +++ b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigrateBuildOptions.cs @@ -49,18 +49,14 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests } [Fact] - public void MigratingEmptyBuildOptionsPopulatesOnlyCompileAndEmbeddedResource() + public void MigratingEmptyBuildOptionsGeneratesAnEmptyCSProj() { var mockProj = RunBuildOptionsRuleOnPj(@" { ""buildOptions"": { } }"); - mockProj.Items.Count().Should().Be(2); - mockProj.Items.First(i => i.ItemType == "Compile").Include.Should().Be(@"**\*.cs"); - mockProj.Items.First(i => i.ItemType == "Compile").Exclude.Should().BeEmpty(); - mockProj.Items.First(i => i.ItemType == "EmbeddedResource").Include.Should().Be(@"compiler\resources\**\*;**\*.resx"); - mockProj.Items.First(i => i.ItemType == "EmbeddedResource").Exclude.Should().Be("@(EmbeddedResource)"); + mockProj.Items.Count().Should().Be(0); } [Fact] @@ -84,6 +80,22 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests mockProj.Items.Count().Should().Be(0); } + [Fact] + public void MigratingConsoleProjectWithoutCustomSourcesOrResourcesDoesNotEmitCompileAndEmbeddedResource() + { + var mockProj = RunBuildOptionsRuleOnPj(@" + { + ""buildOptions"": { + ""emitEntryPoint"": true + }, + ""frameworks"": { + ""netcoreapp1.0"": {} + } + }"); + + mockProj.Items.Count().Should().Be(0); + } + public void MigratingOutputNamePopulatesAssemblyName() { var mockProj = RunBuildOptionsRuleOnPj(@" From 92ee4aac26d8a8b5bb33b698d4b45d1baf968b00 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Wed, 4 Jan 2017 22:13:19 -0800 Subject: [PATCH 2/5] Pinning the CLI version because once this goes in, the next stage0 won't allow for having compile in the csprojs. We will have to update the CLI ones. --- run-build.ps1 | 4 ++-- run-build.sh | 4 ++-- test/dotnet-vstest.Tests/VSTestTests.cs | 7 ++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/run-build.ps1 b/run-build.ps1 index 6e8150c7a..947356f63 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -103,8 +103,8 @@ if ($LastExitCode -ne 0) # install the post-PJnistic stage0 $dotnetInstallPath = Join-Path $toolsLocalPath "dotnet-install.ps1" -Write-Host "$dotnetInstallPath -Version ""latest"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" -Invoke-Expression "$dotnetInstallPath -Version ""latest"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" +Write-Host "$dotnetInstallPath -Version ""1.0.0-preview5-004384"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" +Invoke-Expression "$dotnetInstallPath -Version ""1.0.0-preview5-004384"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" if ($LastExitCode -ne 0) { Write-Output "The .NET CLI installation failed with exit code $LastExitCode" diff --git a/run-build.sh b/run-build.sh index 459e55019..d1c1450d0 100755 --- a/run-build.sh +++ b/run-build.sh @@ -163,8 +163,8 @@ if [ $? != 0 ]; then fi # now execute the script -echo "installing CLI: $dotnetInstallPath --version \"latest\" --install-dir $DOTNET_INSTALL_DIR --architecture \"$ARCHITECTURE\"" -$dotnetInstallPath --version "latest" --install-dir $DOTNET_INSTALL_DIR --architecture "$ARCHITECTURE" +echo "installing CLI: $dotnetInstallPath --version \"1.0.0-preview5-004384\" --install-dir $DOTNET_INSTALL_DIR --architecture \"$ARCHITECTURE\"" +$dotnetInstallPath --version "1.0.0-preview5-004384" --install-dir $DOTNET_INSTALL_DIR --architecture "$ARCHITECTURE" if [ $? != 0 ]; then echo "run-build: Error: Boot-strapping post-PJ stage0 with exit code $?." >&2 exit $? diff --git a/test/dotnet-vstest.Tests/VSTestTests.cs b/test/dotnet-vstest.Tests/VSTestTests.cs index 8a9a28eb3..f6787432a 100644 --- a/test/dotnet-vstest.Tests/VSTestTests.cs +++ b/test/dotnet-vstest.Tests/VSTestTests.cs @@ -19,12 +19,17 @@ namespace Microsoft.DotNet.Cli.VSTest.Tests var testAppName = "VSTestDotNetCore"; var testRoot = TestAssets.Get(testAppName) .CreateInstance() + .WithSourceFiles() .WithRestoreFiles() - .WithBuildFiles() .Root; var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; + new BuildCommand() + .WithWorkingDirectory(testRoot) + .Execute() + .Should().Pass(); + var outputDll = testRoot .GetDirectory("bin", configuration, "netcoreapp1.0") .GetFile($"{testAppName}.dll"); From 3b69588db25f68c7041c0a8cd4be117fbe538a87 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Thu, 5 Jan 2017 09:32:20 -0800 Subject: [PATCH 3/5] Picking up the latest SDK and adding back some named parameters to MigrateBuildOptionsRule for clarity. Updating the tool project to use BuiltProjectOutputGroupOutput instead of content because of SDK issue https://github.com/dotnet/sdk/issues/588 --- .../ToolWithRandomPackageName.csproj | 7 +++---- build/Microsoft.DotNet.Cli.DependencyVersions.props | 2 +- .../Rules/MigrateBuildOptionsRule.cs | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj index f62a21477..592c7bfcb 100644 --- a/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj +++ b/TestAssets/NonRestoredTestProjects/ToolWithRandomPackageName/ToolWithRandomPackageName/ToolWithRandomPackageName.csproj @@ -9,10 +9,9 @@ - - true - lib\$(TargetFramework) - + + $(ProjectRuntimeConfigFilePath) + diff --git a/build/Microsoft.DotNet.Cli.DependencyVersions.props b/build/Microsoft.DotNet.Cli.DependencyVersions.props index 5f758a72e..4cf2278de 100644 --- a/build/Microsoft.DotNet.Cli.DependencyVersions.props +++ b/build/Microsoft.DotNet.Cli.DependencyVersions.props @@ -2,7 +2,7 @@ 15.1.0-preview-000458-02 - 1.0.0-alpha-20170104-3 + 1.0.0-alpha-20170105-1 1.0.0-alpha-20170104-1-189 15.0.0-preview-20161227-02 diff --git a/src/Microsoft.DotNet.ProjectJsonMigration/Rules/MigrateBuildOptionsRule.cs b/src/Microsoft.DotNet.ProjectJsonMigration/Rules/MigrateBuildOptionsRule.cs index 88a404e25..bd6e5ad1d 100644 --- a/src/Microsoft.DotNet.ProjectJsonMigration/Rules/MigrateBuildOptionsRule.cs +++ b/src/Microsoft.DotNet.ProjectJsonMigration/Rules/MigrateBuildOptionsRule.cs @@ -111,10 +111,10 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Rules compilerOptions => compilerOptions.OutputName != null); private IncludeContextTransform CompileFilesTransform => - new IncludeContextTransform("Compile", false, ic => ic != null); + new IncludeContextTransform("Compile", transformMappings: false, condition: ic => ic != null); private IncludeContextTransform EmbedFilesTransform => - new IncludeContextTransform("EmbeddedResource", false, ic => ic != null); + new IncludeContextTransform("EmbeddedResource", transformMappings: false, condition: ic => ic != null); private IncludeContextTransform CopyToOutputFilesTransform => new IncludeContextTransform("Content", transformMappings: true) From 205244fb8aa57d84762ea77e5a933ba0a2b1c555 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Thu, 5 Jan 2017 12:23:29 -0800 Subject: [PATCH 4/5] Fixing failing test and making it work with the new SDK --- .../VSTestXunitDesktopAndNetCore.csproj | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/TestAssets/TestProjects/VSTestXunitDesktopAndNetCore/VSTestXunitDesktopAndNetCore.csproj b/TestAssets/TestProjects/VSTestXunitDesktopAndNetCore/VSTestXunitDesktopAndNetCore.csproj index 758ab76c2..1795bb8cf 100644 --- a/TestAssets/TestProjects/VSTestXunitDesktopAndNetCore/VSTestXunitDesktopAndNetCore.csproj +++ b/TestAssets/TestProjects/VSTestXunitDesktopAndNetCore/VSTestXunitDesktopAndNetCore.csproj @@ -1,10 +1,11 @@ - - + Exe net46;netcoreapp1.0 + win7-x86 + win7-x86 @@ -17,12 +18,7 @@ - - - - 1.0.0-alpha-20161026-2 - All - + $(CLI_TestPlatform_Version) @@ -33,6 +29,4 @@ 2.2.0-beta4-build1194 - - From 72cd3d7c43496540aacf7affac8007ddbc46c700 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Thu, 5 Jan 2017 12:40:23 -0800 Subject: [PATCH 5/5] Pinning stage0 to latest and reverting build scripts to use stage0 for now. --- build/Microsoft.DotNet.Cli.Test.targets | 10 +++++----- build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets | 4 ++-- build/package/Microsoft.DotNet.Cli.Installer.DEB.proj | 2 +- .../package/Microsoft.DotNet.Cli.Installer.MSI.targets | 2 +- build/package/Microsoft.DotNet.Cli.Nupkg.targets | 4 ++-- run-build.ps1 | 4 ++-- run-build.sh | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/build/Microsoft.DotNet.Cli.Test.targets b/build/Microsoft.DotNet.Cli.Test.targets index 71a4ecd59..eb9e98c36 100644 --- a/build/Microsoft.DotNet.Cli.Test.targets +++ b/build/Microsoft.DotNet.Cli.Test.targets @@ -42,7 +42,7 @@ TestProject=%(TestProjects.ProjectPath); TestProjectName=%(TestProjects.OutputName); TestResultXmlDir=$(TestResultXmlDir); - ToolPath=$(Stage2Directory); + ToolPath=$(Stage0Directory); WorkingDirectory=%(TestProjects.ProjectDir) @@ -79,7 +79,7 @@ Outputs="%(TestProjects.BuildOutput)"> @@ -91,7 +91,7 @@ Outputs="@(RestoreTestsInputs->'%(RelativeDir)/obj/project.assets.json');@(RestoreTestsInputs->'%(RelativeDir)/obj/%(Filename).csproj.nuget.g.props');@(RestoreTestsInputs->'%(RelativeDir)/obj/%(Filename).csproj.nuget.g.targets')"> - @@ -217,7 +217,7 @@ @@ -231,7 +231,7 @@ + ToolPath="$(Stage0Directory)" /> - - + + ToolPath="$(Stage0Directory)" /> diff --git a/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets b/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets index f80aa83e8..e1f6ba617 100644 --- a/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets +++ b/build/package/Microsoft.DotNet.Cli.Installer.MSI.targets @@ -144,7 +144,7 @@ + -DotnetDir '$(Stage0Directory)'" /> @@ -36,7 +36,7 @@ - diff --git a/run-build.ps1 b/run-build.ps1 index 947356f63..8b70746ed 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -103,8 +103,8 @@ if ($LastExitCode -ne 0) # install the post-PJnistic stage0 $dotnetInstallPath = Join-Path $toolsLocalPath "dotnet-install.ps1" -Write-Host "$dotnetInstallPath -Version ""1.0.0-preview5-004384"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" -Invoke-Expression "$dotnetInstallPath -Version ""1.0.0-preview5-004384"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" +Write-Host "$dotnetInstallPath -Version ""1.0.0-preview5-004392"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" +Invoke-Expression "$dotnetInstallPath -Version ""1.0.0-preview5-004392"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" if ($LastExitCode -ne 0) { Write-Output "The .NET CLI installation failed with exit code $LastExitCode" diff --git a/run-build.sh b/run-build.sh index d1c1450d0..553393b83 100755 --- a/run-build.sh +++ b/run-build.sh @@ -163,8 +163,8 @@ if [ $? != 0 ]; then fi # now execute the script -echo "installing CLI: $dotnetInstallPath --version \"1.0.0-preview5-004384\" --install-dir $DOTNET_INSTALL_DIR --architecture \"$ARCHITECTURE\"" -$dotnetInstallPath --version "1.0.0-preview5-004384" --install-dir $DOTNET_INSTALL_DIR --architecture "$ARCHITECTURE" +echo "installing CLI: $dotnetInstallPath --version \"1.0.0-preview5-004392\" --install-dir $DOTNET_INSTALL_DIR --architecture \"$ARCHITECTURE\"" +$dotnetInstallPath --version "1.0.0-preview5-004392" --install-dir $DOTNET_INSTALL_DIR --architecture "$ARCHITECTURE" if [ $? != 0 ]; then echo "run-build: Error: Boot-strapping post-PJ stage0 with exit code $?." >&2 exit $?