From 14e4ff50f5712e349429b1321e3f01b894945578 Mon Sep 17 00:00:00 2001 From: David Kean Date: Wed, 2 Aug 2017 18:34:07 +1000 Subject: [PATCH 01/35] Let VS update solution with current state (cherry picked from commit 4c8c137a6c403df5f5b35ebd2e59f7d1b144b28d) --- Microsoft.DotNet.Cli.sln | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index 3733528ebf..de66f82446 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26510.0 +VisualStudioVersion = 15.0.26730.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ED2FE3E2-F7E7-4389-8231-B65123F2076F}" EndProject @@ -38,6 +38,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4 build\Compile.targets = build\Compile.targets build\CrossGen.props = build\CrossGen.props build\DependencyVersions.props = build\DependencyVersions.props + build\DerivedHostMachineInfo.props = build\DerivedHostMachineInfo.props build\FileExtensions.props = build\FileExtensions.props build\GitCommitInfo.targets = build\GitCommitInfo.targets build\HostInfo.targets = build\HostInfo.targets @@ -59,7 +60,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4 build\Test.targets = build\Test.targets build\Version.props = build\Version.props build\VersionBadge.props = build\VersionBadge.props - build\DerivedHostMachineInfo.props = build\DerivedHostMachineInfo.props EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "package", "package", "{FD7D515A-D10F-4F49-B8AE-21CF7ED071AE}" @@ -1593,6 +1593,30 @@ Global {08A40B6A-F695-4EA9-AC8D-CF88FADEA796}.RelWithDebInfo|x64.Build.0 = Release|Any CPU {08A40B6A-F695-4EA9-AC8D-CF88FADEA796}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU {08A40B6A-F695-4EA9-AC8D-CF88FADEA796}.RelWithDebInfo|x86.Build.0 = Release|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Debug|x64.ActiveCfg = Debug|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Debug|x64.Build.0 = Debug|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Debug|x86.ActiveCfg = Debug|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Debug|x86.Build.0 = Debug|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.MinSizeRel|x86.Build.0 = Debug|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Release|Any CPU.Build.0 = Release|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Release|x64.ActiveCfg = Release|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Release|x64.Build.0 = Release|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Release|x86.ActiveCfg = Release|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.Release|x86.Build.0 = Release|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU + {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1664,4 +1688,7 @@ Global {B1AEC227-5115-44BC-92D2-B1B3545E1DDE} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {08A40B6A-F695-4EA9-AC8D-CF88FADEA796} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B526D2CE-EE2D-4AD4-93EF-1867D90FF1F5} + EndGlobalSection EndGlobal From 8d8fb5112c2c734913c35fe80a510104e776cfb8 Mon Sep 17 00:00:00 2001 From: David Kean Date: Wed, 2 Aug 2017 18:38:02 +1000 Subject: [PATCH 02/35] Remove non-existent projects (cherry picked from commit 3c81474cacf671dc379874c675e941f1b9b66c66) --- Microsoft.DotNet.Cli.sln | 83 ---------------------------------------- 1 file changed, 83 deletions(-) diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index de66f82446..6729a2236b 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -13,8 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{17735A9D-BFD9-4585-A7CB-3208CA6EA8A7}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0722D325-24C8-4E83-B5AF-0A083E7F0749}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build_projects", "build_projects", "{88278B81-7649-45DC-8A6A-D3A645C5AFC3}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestAssets", "TestAssets", "{ADA7052B-884B-4776-8B8D-D04191D0AA70}" @@ -131,8 +129,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PackageWithFakeNativeDep", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ToolWithOutputName", "TestAssets\TestPackages\ToolWithOutputName\ToolWithOutputName.csproj", "{8FB83810-5A4C-4097-9A79-8E687E4981CB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-archive", "src\dotnet-archive\dotnet-archive.csproj", "{F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet", "src\dotnet\dotnet.csproj", "{203F0362-DAFC-4679-A01E-7FBC331D8647}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Archive", "src\Microsoft.DotNet.Archive\Microsoft.DotNet.Archive.csproj", "{F8C66E8A-FC59-40B3-AC0F-58CA22526F76}" @@ -153,8 +149,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_msbuild", "src\tool_ms EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_nuget", "src\tool_nuget\tool_nuget.csproj", "{BE4C655A-DC54-4408-B739-743456D34111}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Archiver", "tools\Archiver\Archiver.csproj", "{2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArgumentForwardingTests", "test\ArgumentForwardingTests\ArgumentForwardingTests.csproj", "{3E28672F-F4E4-44D5-AEFB-1F425DECC57E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArgumentsReflector", "test\ArgumentsReflector\ArgumentsReflector.csproj", "{A5CA696F-585E-40AB-912C-6316BC330C5E}" @@ -199,8 +193,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Tools.Test EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "msbuild.IntegrationTests", "test\msbuild.IntegrationTests\msbuild.IntegrationTests.csproj", "{23EE9BBB-3B33-4CF2-8D1A-29A8DB12E878}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Performance", "test\Performance\Performance.csproj", "{F5E27BA5-063B-4770-A6E8-87252E9AB22C}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Cli.Build.Framework", "build_projects\Microsoft.DotNet.Cli.Build.Framework\Microsoft.DotNet.Cli.Build.Framework.csproj", "{AA744891-5209-4335-8457-37EC347DF833}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "shared-build-targets-utils", "build_projects\shared-build-targets-utils\shared-build-targets-utils.csproj", "{DA3595A8-35DE-42B9-97A4-4A2461BAD554}" @@ -513,30 +505,6 @@ Global {8FB83810-5A4C-4097-9A79-8E687E4981CB}.RelWithDebInfo|x64.Build.0 = Release|Any CPU {8FB83810-5A4C-4097-9A79-8E687E4981CB}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU {8FB83810-5A4C-4097-9A79-8E687E4981CB}.RelWithDebInfo|x86.Build.0 = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Debug|x64.ActiveCfg = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Debug|x64.Build.0 = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Debug|x86.ActiveCfg = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Debug|x86.Build.0 = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.MinSizeRel|x64.ActiveCfg = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.MinSizeRel|x64.Build.0 = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.MinSizeRel|x86.ActiveCfg = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.MinSizeRel|x86.Build.0 = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Release|Any CPU.Build.0 = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Release|x64.ActiveCfg = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Release|x64.Build.0 = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Release|x86.ActiveCfg = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.Release|x86.Build.0 = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D}.RelWithDebInfo|x86.Build.0 = Release|Any CPU {203F0362-DAFC-4679-A01E-7FBC331D8647}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {203F0362-DAFC-4679-A01E-7FBC331D8647}.Debug|Any CPU.Build.0 = Debug|Any CPU {203F0362-DAFC-4679-A01E-7FBC331D8647}.Debug|x64.ActiveCfg = Release|Any CPU @@ -777,30 +745,6 @@ Global {BE4C655A-DC54-4408-B739-743456D34111}.RelWithDebInfo|x64.Build.0 = Release|Any CPU {BE4C655A-DC54-4408-B739-743456D34111}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU {BE4C655A-DC54-4408-B739-743456D34111}.RelWithDebInfo|x86.Build.0 = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Debug|x64.ActiveCfg = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Debug|x64.Build.0 = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Debug|x86.ActiveCfg = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Debug|x86.Build.0 = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.MinSizeRel|x64.ActiveCfg = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.MinSizeRel|x64.Build.0 = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.MinSizeRel|x86.ActiveCfg = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.MinSizeRel|x86.Build.0 = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Release|Any CPU.Build.0 = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Release|x64.ActiveCfg = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Release|x64.Build.0 = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Release|x86.ActiveCfg = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.Release|x86.Build.0 = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2}.RelWithDebInfo|x86.Build.0 = Release|Any CPU {3E28672F-F4E4-44D5-AEFB-1F425DECC57E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3E28672F-F4E4-44D5-AEFB-1F425DECC57E}.Debug|Any CPU.Build.0 = Debug|Any CPU {3E28672F-F4E4-44D5-AEFB-1F425DECC57E}.Debug|x64.ActiveCfg = Release|Any CPU @@ -1329,30 +1273,6 @@ Global {23EE9BBB-3B33-4CF2-8D1A-29A8DB12E878}.RelWithDebInfo|x64.Build.0 = Release|Any CPU {23EE9BBB-3B33-4CF2-8D1A-29A8DB12E878}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU {23EE9BBB-3B33-4CF2-8D1A-29A8DB12E878}.RelWithDebInfo|x86.Build.0 = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Debug|x64.ActiveCfg = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Debug|x64.Build.0 = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Debug|x86.ActiveCfg = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Debug|x86.Build.0 = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.MinSizeRel|x64.ActiveCfg = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.MinSizeRel|x64.Build.0 = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.MinSizeRel|x86.ActiveCfg = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.MinSizeRel|x86.Build.0 = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Release|Any CPU.Build.0 = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Release|x64.ActiveCfg = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Release|x64.Build.0 = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Release|x86.ActiveCfg = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.Release|x86.Build.0 = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU - {F5E27BA5-063B-4770-A6E8-87252E9AB22C}.RelWithDebInfo|x86.Build.0 = Release|Any CPU {AA744891-5209-4335-8457-37EC347DF833}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AA744891-5209-4335-8457-37EC347DF833}.Debug|Any CPU.Build.0 = Debug|Any CPU {AA744891-5209-4335-8457-37EC347DF833}.Debug|x64.ActiveCfg = Release|Any CPU @@ -1641,7 +1561,6 @@ Global {736BF068-7389-41B9-BF63-D4E49B9BC833} = {1AB5B24B-B317-4142-A5D1-A6E84F15BA34} {48408A19-CCC5-4C85-990B-0A9F827BF29A} = {1AB5B24B-B317-4142-A5D1-A6E84F15BA34} {8FB83810-5A4C-4097-9A79-8E687E4981CB} = {1AB5B24B-B317-4142-A5D1-A6E84F15BA34} - {F0CB08B6-2809-4D37-B1DD-A9B7F1B0D95D} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {203F0362-DAFC-4679-A01E-7FBC331D8647} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {F8C66E8A-FC59-40B3-AC0F-58CA22526F76} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {73ACEB34-D22C-43EA-87BE-EFC0E83D0126} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} @@ -1652,7 +1571,6 @@ Global {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {D82A3246-9831-4024-A9B2-1932EEF3D56F} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {BE4C655A-DC54-4408-B739-743456D34111} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} - {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2} = {0722D325-24C8-4E83-B5AF-0A083E7F0749} {3E28672F-F4E4-44D5-AEFB-1F425DECC57E} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {A5CA696F-585E-40AB-912C-6316BC330C5E} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {4EF497BF-D717-4E03-90B1-932C7F51B918} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} @@ -1674,7 +1592,6 @@ Global {F228580D-9373-4A60-AB88-76DF58D11580} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {48E260F4-6F3F-4387-B61F-D15BABD06D9A} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {23EE9BBB-3B33-4CF2-8D1A-29A8DB12E878} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} - {F5E27BA5-063B-4770-A6E8-87252E9AB22C} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {AA744891-5209-4335-8457-37EC347DF833} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3} {DA3595A8-35DE-42B9-97A4-4A2461BAD554} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3} {F2D1A7DA-B3EB-4CA7-BAA9-A18CEC398853} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3} From 88ceffec3037ab6ea713d3ea2f16273c44376b16 Mon Sep 17 00:00:00 2001 From: David Kean Date: Wed, 2 Aug 2017 18:40:30 +1000 Subject: [PATCH 03/35] Add MSBuildSdkResolver to the sln Fixes: https://github.com/dotnet/cli/issues/7351. (cherry picked from commit 369b8931520bd7fc6d2d91430e81de9e652880dd) --- Microsoft.DotNet.Cli.sln | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index 6729a2236b..8f541adb98 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -225,6 +225,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-add-package.Tests", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_fsc", "src\tool_fsharp\tool_fsc.csproj", "{602976C5-2477-4B4C-AD9A-1EAFB250529A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.MSBuildSdkResolver", "src\Microsoft.DotNet.MSBuildSdkResolver\Microsoft.DotNet.MSBuildSdkResolver.csproj", "{FCDFAF40-CC16-4D49-96C0-E49F195E7142}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1537,6 +1539,30 @@ Global {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|x64.Build.0 = Release|Any CPU {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU {602976C5-2477-4B4C-AD9A-1EAFB250529A}.RelWithDebInfo|x86.Build.0 = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Debug|x64.ActiveCfg = Debug|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Debug|x64.Build.0 = Debug|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Debug|x86.ActiveCfg = Debug|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Debug|x86.Build.0 = Debug|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.MinSizeRel|x64.ActiveCfg = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.MinSizeRel|x64.Build.0 = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.MinSizeRel|x86.ActiveCfg = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.MinSizeRel|x86.Build.0 = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Release|Any CPU.Build.0 = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Release|x64.ActiveCfg = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Release|x64.Build.0 = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Release|x86.ActiveCfg = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.Release|x86.Build.0 = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU + {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1604,6 +1630,7 @@ Global {3F7D56A3-A280-467E-8916-C18659C243BA} = {1AB5B24B-B317-4142-A5D1-A6E84F15BA34} {B1AEC227-5115-44BC-92D2-B1B3545E1DDE} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {08A40B6A-F695-4EA9-AC8D-CF88FADEA796} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} + {FCDFAF40-CC16-4D49-96C0-E49F195E7142} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B526D2CE-EE2D-4AD4-93EF-1867D90FF1F5} From 92f727c736bb92d04e83340ea7d3c95c63bb1bb9 Mon Sep 17 00:00:00 2001 From: David Kean Date: Wed, 2 Aug 2017 18:43:27 +1000 Subject: [PATCH 04/35] Move projects to virtual foldes Move tool_fsc to src Move dotnet-help.Tests to test (cherry picked from commit f00adb1057dbd4cae54246a40ffc653ed8ae5995) --- Microsoft.DotNet.Cli.sln | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index 8f541adb98..5929564f2a 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -1603,6 +1603,7 @@ Global {18B43540-346F-4AFF-8868-A82CF098FAFD} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {C3845C85-1F59-4552-BE52-32F513CE795F} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {BBB5A4C8-CD2D-4A6A-9159-0FEAF84B745E} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} + {8AA88E83-6A98-4AD6-86EB-2ED4F6EDA17F} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {726D2CB9-80E5-4496-9C86-910AC452C45E} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {EF745C56-0350-4C42-AA22-86D592E1D8D5} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {87063BA1-454D-4433-ADF9-89C667275D62} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} @@ -1630,6 +1631,7 @@ Global {3F7D56A3-A280-467E-8916-C18659C243BA} = {1AB5B24B-B317-4142-A5D1-A6E84F15BA34} {B1AEC227-5115-44BC-92D2-B1B3545E1DDE} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {08A40B6A-F695-4EA9-AC8D-CF88FADEA796} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} + {602976C5-2477-4B4C-AD9A-1EAFB250529A} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {FCDFAF40-CC16-4D49-96C0-E49F195E7142} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution From 87268c57ad69f634e2fde407b45423d5df0aa366 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Fri, 25 Aug 2017 14:19:43 -0700 Subject: [PATCH 05/35] Use fixed RTM build of PlatformAbstractions from build project (cherry picked from commit 0a1be24e2f5a2fd9f40c6be4bfa753684d464ecc) --- build_projects/dotnet-cli-build/dotnet-cli-build.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj index 872cae9956..5186a2ee04 100644 --- a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj +++ b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj @@ -27,7 +27,7 @@ - + From 138b98f65fe2dc562c0bef3eefdec89eb9995036 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Wed, 27 Sep 2017 13:28:45 -0700 Subject: [PATCH 06/35] Use $(CliTargetFramework), eliminate warnings, treat warnings as errors (cherry picked from commit 656eab7aeccf96f03ea95bf9864190daa251121b) --- build/BuildDefaults.props | 9 +++++++++ build/sdks/sdks.csproj | 2 ++ .../Microsoft.DotNet.Cli.Utils.csproj | 2 +- src/dotnet/HelpException.cs | 1 - src/dotnet/dotnet.csproj | 4 ++-- src/redist/redist.csproj | 2 +- src/tool_fsharp/tool_fsc.csproj | 2 +- src/tool_roslyn/tool_roslyn.csproj | 2 +- 8 files changed, 17 insertions(+), 7 deletions(-) diff --git a/build/BuildDefaults.props b/build/BuildDefaults.props index 64eddcfd43..1e985282c4 100644 --- a/build/BuildDefaults.props +++ b/build/BuildDefaults.props @@ -7,5 +7,14 @@ true true true + + + true + + + + NU1701 + + true diff --git a/build/sdks/sdks.csproj b/build/sdks/sdks.csproj index b7c9941c0f..da276047e6 100755 --- a/build/sdks/sdks.csproj +++ b/build/sdks/sdks.csproj @@ -1,5 +1,6 @@  + Library @@ -9,6 +10,7 @@ + diff --git a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj index ed1056755d..fec257bddd 100644 --- a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj +++ b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj @@ -24,7 +24,7 @@ - + diff --git a/src/dotnet/HelpException.cs b/src/dotnet/HelpException.cs index 98f2eb6f77..f1f9eb5b4b 100644 --- a/src/dotnet/HelpException.cs +++ b/src/dotnet/HelpException.cs @@ -6,7 +6,6 @@ namespace Microsoft.DotNet.Cli /// /// Allows control flow to be interrupted in order to display help in the console. /// - [Obsolete("This is intended to facilitate refactoring during parser replacement and should not be used after that work is done.")] public class HelpException : Exception { public HelpException(string message) : base(message) diff --git a/src/dotnet/dotnet.csproj b/src/dotnet/dotnet.csproj index 71da966763..e5f36bff34 100644 --- a/src/dotnet/dotnet.csproj +++ b/src/dotnet/dotnet.csproj @@ -2,13 +2,13 @@ $(SdkVersion) - netcoreapp2.0 + $(CliTargetFramework) dotnet Exe ../../tools/Key.snk true true - $(AssetTargetFallback);dotnet5.4 + dotnet5.4 Microsoft.DotNet.Cli diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index c45cd6bdf6..39458acffb 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -10,7 +10,7 @@ $(CLI_SharedFrameworkVersion) true false - $(AssetTargetFallback);dotnet5.4 + dotnet5.4 $(SdkOutputDirectory) $(CommitCount) diff --git a/src/tool_fsharp/tool_fsc.csproj b/src/tool_fsharp/tool_fsc.csproj index dcd58965a1..d8fb482462 100644 --- a/src/tool_fsharp/tool_fsc.csproj +++ b/src/tool_fsharp/tool_fsc.csproj @@ -4,7 +4,7 @@ $(CliVersionPrefix) - netcoreapp2.0 + $(CliTargetFramework) true $(FSharpDirectory) $(CommitCount) diff --git a/src/tool_roslyn/tool_roslyn.csproj b/src/tool_roslyn/tool_roslyn.csproj index bd702ca7c3..ee6a775227 100644 --- a/src/tool_roslyn/tool_roslyn.csproj +++ b/src/tool_roslyn/tool_roslyn.csproj @@ -4,7 +4,7 @@ $(CliVersionPrefix) - netcoreapp2.0 + $(CliTargetFramework) $(CLI_SharedFrameworkVersion) true $(RoslynDirectory) From 6fad8be40a00ba11dc04c441c88141aeb018bd3b Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Fri, 25 Aug 2017 19:59:02 -0700 Subject: [PATCH 07/35] Fix warnings in test projects --- .../dotnet-desktop-binding-redirects.csproj | 2 +- .../ArgumentForwardingTests/ArgumentForwardingTests.csproj | 6 +++--- test/EndToEnd/EndToEnd.csproj | 7 +++---- .../Microsoft.DotNet.Cli.Msi.Tests.csproj | 4 ++-- .../Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj | 6 +++--- .../Microsoft.DotNet.Cli.Utils.Tests.csproj | 7 ++++--- .../Microsoft.DotNet.Configurer.UnitTests.csproj | 7 ++++--- .../Microsoft.DotNet.Tools.Tests.Utilities.csproj | 2 +- .../Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj | 5 ++++- .../binding-redirects.Tests/binding-redirects.Tests.csproj | 6 +++--- test/crossgen.Tests/crossgen.Tests.csproj | 6 +++--- .../dotnet-add-package.Tests.csproj | 6 +++--- .../dotnet-add-reference.Tests.csproj | 6 +++--- .../dotnet-back-compat.Tests.csproj | 6 +++--- test/dotnet-build.Tests/dotnet-build.Tests.csproj | 6 +++--- test/dotnet-clean.Tests/dotnet-clean.Tests.csproj | 6 +++--- test/dotnet-help.Tests/dotnet-help.Tests.csproj | 6 +++--- .../dotnet-list-reference.Tests.csproj | 6 +++--- test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj | 7 ++++--- test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj | 6 +++--- test/dotnet-new.Tests/dotnet-new.Tests.csproj | 6 +++--- test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj | 7 ++++--- test/dotnet-pack.Tests/dotnet-pack.Tests.csproj | 6 +++--- test/dotnet-publish.Tests/dotnet-publish.Tests.csproj | 6 +++--- .../dotnet-remove-package.Tests.csproj | 6 +++--- .../dotnet-remove-reference.Tests.csproj | 6 +++--- test/dotnet-restore.Tests/dotnet-restore.Tests.csproj | 6 +++--- test/dotnet-run.Tests/dotnet-run.Tests.csproj | 6 +++--- test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj | 6 +++--- test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj | 6 +++--- .../dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj | 6 +++--- test/dotnet-store.Tests/dotnet-store.Tests.csproj | 6 +++--- test/dotnet-test.Tests/dotnet-test.Tests.csproj | 6 +++--- test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj | 6 +++--- test/dotnet.Tests/dotnet.Tests.csproj | 7 +++---- .../msbuild.IntegrationTests.csproj | 6 +++--- testAsset.props | 3 +++ 37 files changed, 111 insertions(+), 103 deletions(-) diff --git a/TestAssets/TestPackages/dotnet-desktop-binding-redirects/dotnet-desktop-binding-redirects.csproj b/TestAssets/TestPackages/dotnet-desktop-binding-redirects/dotnet-desktop-binding-redirects.csproj index 4505fc5a04..f77a56e083 100644 --- a/TestAssets/TestPackages/dotnet-desktop-binding-redirects/dotnet-desktop-binding-redirects.csproj +++ b/TestAssets/TestPackages/dotnet-desktop-binding-redirects/dotnet-desktop-binding-redirects.csproj @@ -9,7 +9,7 @@ - + diff --git a/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj index c71c5cf15b..a6773725fa 100644 --- a/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj +++ b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj @@ -15,9 +15,9 @@ - - - + + + diff --git a/test/EndToEnd/EndToEnd.csproj b/test/EndToEnd/EndToEnd.csproj index 83c4a521a0..19586cb7d7 100644 --- a/test/EndToEnd/EndToEnd.csproj +++ b/test/EndToEnd/EndToEnd.csproj @@ -22,10 +22,9 @@ - - - - + + + diff --git a/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj b/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj index e576ed679b..b3675ea9d4 100644 --- a/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj +++ b/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj @@ -17,8 +17,8 @@ - - + + diff --git a/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj b/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj index 0cc22883c6..7f0760ef80 100644 --- a/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj +++ b/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj @@ -21,9 +21,9 @@ - - - + + + \ No newline at end of file diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj index dce7b8e2e6..2642b4ada1 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj @@ -30,15 +30,16 @@ - - + + - + + diff --git a/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj b/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj index 69269abf54..4b47565124 100644 --- a/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj +++ b/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj @@ -19,10 +19,11 @@ - - + + - + + diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj b/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj index c13629f525..7671292631 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj b/test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj index ded34abd07..032ba74328 100644 --- a/test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj +++ b/test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj @@ -6,6 +6,9 @@ $(CLI_SharedFrameworkVersion) Msbuild.Tests.Utilities $(AssetTargetFallback);dotnet5.4;portable-net451+win8 + ../../tools/Key.snk + true + true @@ -19,7 +22,7 @@ - + diff --git a/test/binding-redirects.Tests/binding-redirects.Tests.csproj b/test/binding-redirects.Tests/binding-redirects.Tests.csproj index 7922a876dc..e979f1d7b7 100644 --- a/test/binding-redirects.Tests/binding-redirects.Tests.csproj +++ b/test/binding-redirects.Tests/binding-redirects.Tests.csproj @@ -14,9 +14,9 @@ - - - + + + diff --git a/test/crossgen.Tests/crossgen.Tests.csproj b/test/crossgen.Tests/crossgen.Tests.csproj index 980cd78e74..ffd348ff1e 100644 --- a/test/crossgen.Tests/crossgen.Tests.csproj +++ b/test/crossgen.Tests/crossgen.Tests.csproj @@ -15,8 +15,8 @@ - - - + + + diff --git a/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj b/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj index 36ec73b005..5185599024 100644 --- a/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj +++ b/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj @@ -22,9 +22,9 @@ - - - + + + diff --git a/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj b/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj index 46b4c5b3a0..744ed0798c 100644 --- a/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj +++ b/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj @@ -20,10 +20,10 @@ - - + + - + diff --git a/test/dotnet-back-compat.Tests/dotnet-back-compat.Tests.csproj b/test/dotnet-back-compat.Tests/dotnet-back-compat.Tests.csproj index 0b7b9fa266..3f55e51097 100644 --- a/test/dotnet-back-compat.Tests/dotnet-back-compat.Tests.csproj +++ b/test/dotnet-back-compat.Tests/dotnet-back-compat.Tests.csproj @@ -13,8 +13,8 @@ - - - + + + diff --git a/test/dotnet-build.Tests/dotnet-build.Tests.csproj b/test/dotnet-build.Tests/dotnet-build.Tests.csproj index d72a8f9867..98d275251b 100644 --- a/test/dotnet-build.Tests/dotnet-build.Tests.csproj +++ b/test/dotnet-build.Tests/dotnet-build.Tests.csproj @@ -14,9 +14,9 @@ - - - + + + diff --git a/test/dotnet-clean.Tests/dotnet-clean.Tests.csproj b/test/dotnet-clean.Tests/dotnet-clean.Tests.csproj index 831a64d3bc..b1183fbac8 100644 --- a/test/dotnet-clean.Tests/dotnet-clean.Tests.csproj +++ b/test/dotnet-clean.Tests/dotnet-clean.Tests.csproj @@ -14,9 +14,9 @@ - - - + + + diff --git a/test/dotnet-help.Tests/dotnet-help.Tests.csproj b/test/dotnet-help.Tests/dotnet-help.Tests.csproj index 88443c6743..e14909b1d6 100644 --- a/test/dotnet-help.Tests/dotnet-help.Tests.csproj +++ b/test/dotnet-help.Tests/dotnet-help.Tests.csproj @@ -18,9 +18,9 @@ - - + + - + diff --git a/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj b/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj index c623260071..e3f183fe19 100644 --- a/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj +++ b/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj @@ -19,9 +19,9 @@ - - - + + + diff --git a/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj b/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj index 2a9fe29630..2a17335f77 100644 --- a/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj +++ b/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj @@ -23,11 +23,12 @@ - - - + + + + diff --git a/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj b/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj index 4a20f6cf96..e0c9b8258c 100644 --- a/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj +++ b/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj @@ -18,8 +18,8 @@ - - - + + + diff --git a/test/dotnet-new.Tests/dotnet-new.Tests.csproj b/test/dotnet-new.Tests/dotnet-new.Tests.csproj index 7dc7368f6d..6fc972c60b 100644 --- a/test/dotnet-new.Tests/dotnet-new.Tests.csproj +++ b/test/dotnet-new.Tests/dotnet-new.Tests.csproj @@ -15,9 +15,9 @@ - - + + - + diff --git a/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj b/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj index 327ad4bec8..41e6d7ee0e 100644 --- a/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj +++ b/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj @@ -16,9 +16,10 @@ - - - + + + + diff --git a/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj b/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj index 755ce3f438..74ab88ecb3 100644 --- a/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj +++ b/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj @@ -22,9 +22,9 @@ - - + + - + diff --git a/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj b/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj index 5641910fa4..cac4ae9c7b 100644 --- a/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj +++ b/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj @@ -21,8 +21,8 @@ - - - + + + diff --git a/test/dotnet-remove-package.Tests/dotnet-remove-package.Tests.csproj b/test/dotnet-remove-package.Tests/dotnet-remove-package.Tests.csproj index 84669fe6d2..44dde6ca02 100644 --- a/test/dotnet-remove-package.Tests/dotnet-remove-package.Tests.csproj +++ b/test/dotnet-remove-package.Tests/dotnet-remove-package.Tests.csproj @@ -19,9 +19,9 @@ - - - + + + diff --git a/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj b/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj index 53a68dce5e..e8d6ae8938 100644 --- a/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj +++ b/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj @@ -19,9 +19,9 @@ - - - + + + diff --git a/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj b/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj index 8122464482..d1d9c2b56c 100644 --- a/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj +++ b/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj @@ -15,10 +15,10 @@ - - + + - + diff --git a/test/dotnet-run.Tests/dotnet-run.Tests.csproj b/test/dotnet-run.Tests/dotnet-run.Tests.csproj index e1b7fbe50e..8264e6589d 100644 --- a/test/dotnet-run.Tests/dotnet-run.Tests.csproj +++ b/test/dotnet-run.Tests/dotnet-run.Tests.csproj @@ -18,8 +18,8 @@ - - - + + + diff --git a/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj b/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj index 6bc9287df5..c58b914c38 100644 --- a/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj +++ b/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj @@ -22,9 +22,9 @@ - - - + + + diff --git a/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj b/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj index a7b8068632..bbd6e14ae8 100644 --- a/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj +++ b/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj @@ -22,8 +22,8 @@ - - - + + + diff --git a/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj b/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj index 8609bdb053..136a4d5a70 100644 --- a/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj +++ b/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj @@ -22,8 +22,8 @@ - - - + + + diff --git a/test/dotnet-store.Tests/dotnet-store.Tests.csproj b/test/dotnet-store.Tests/dotnet-store.Tests.csproj index 650b63b6a6..8ebe9ef7db 100644 --- a/test/dotnet-store.Tests/dotnet-store.Tests.csproj +++ b/test/dotnet-store.Tests/dotnet-store.Tests.csproj @@ -14,8 +14,8 @@ - - - + + + diff --git a/test/dotnet-test.Tests/dotnet-test.Tests.csproj b/test/dotnet-test.Tests/dotnet-test.Tests.csproj index a47ee9357e..5c89ff2f75 100644 --- a/test/dotnet-test.Tests/dotnet-test.Tests.csproj +++ b/test/dotnet-test.Tests/dotnet-test.Tests.csproj @@ -14,8 +14,8 @@ - - - + + + diff --git a/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj b/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj index c774406bd7..e63222e9e6 100644 --- a/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj +++ b/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj @@ -14,8 +14,8 @@ - - - + + + diff --git a/test/dotnet.Tests/dotnet.Tests.csproj b/test/dotnet.Tests/dotnet.Tests.csproj index 12467295b0..f30b3f1315 100644 --- a/test/dotnet.Tests/dotnet.Tests.csproj +++ b/test/dotnet.Tests/dotnet.Tests.csproj @@ -37,10 +37,9 @@ - - - - + + + diff --git a/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj b/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj index cab0ce168b..67c66fb635 100644 --- a/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj +++ b/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj @@ -14,8 +14,8 @@ - - - + + + diff --git a/testAsset.props b/testAsset.props index 4c05b30f1a..af559d0b49 100644 --- a/testAsset.props +++ b/testAsset.props @@ -1,3 +1,6 @@ + + true + From c834676ecb3e95c47dd33f2e06e238f421140622 Mon Sep 17 00:00:00 2001 From: William Li Date: Wed, 9 Aug 2017 16:57:47 -0700 Subject: [PATCH 08/35] Port #7460 from master to 2.0.x Use Rest Api to upload to the feed Add pulling logic to make sure it is uploaded to the feed. Add retry logic for the whole upload process Remove the old upload script (cherry picked from commit 7f54ccb903f43cd7c8a8b774a4d3e84cecf1064a) --- Microsoft.DotNet.Cli.sln | 27 +++ build/Microsoft.DotNet.Cli.tasks | 1 + build/publish/PublishDebian.targets | 37 ++-- .../GivenActionAndRetryTimes.cs | 92 +++++++++ .../dotnet-cli-build.Tests.csproj | 22 ++ .../AddPackageStrategy.cs | 62 ++++++ .../ExponentialRetry.cs | 53 +++++ ...oAddPackageToPackageRepositoryException.cs | 24 +++ .../FileUploadStrategy.cs | 49 +++++ ...AzurelinuxRepositoryServiceHttpStrategy.cs | 15 ++ .../IdInRepositoryService.cs | 18 ++ .../LinuxPackageRepositoryDestiny.cs | 38 ++++ .../LinuxPackageRepositoryHttpPrepare.cs | 46 +++++ .../PullQueuedPackageStatus.cs | 34 +++ .../QueueResourceLocation.cs | 18 ++ .../RetryFailedException.cs | 23 +++ .../UploadToLinuxPackageRepository.cs | 108 ++++++++++ scripts/publish/repoapi_client.sh | 194 ------------------ 18 files changed, 646 insertions(+), 215 deletions(-) create mode 100644 build_projects/dotnet-cli-build.Tests/GivenActionAndRetryTimes.cs create mode 100644 build_projects/dotnet-cli-build.Tests/dotnet-cli-build.Tests.csproj create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/AddPackageStrategy.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/ExponentialRetry.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FailedToAddPackageToPackageRepositoryException.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FileUploadStrategy.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IAzurelinuxRepositoryServiceHttpStrategy.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IdInRepositoryService.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryDestiny.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryHttpPrepare.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/PullQueuedPackageStatus.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/QueueResourceLocation.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/RetryFailedException.cs create mode 100644 build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs delete mode 100755 scripts/publish/repoapi_client.sh diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index 5929564f2a..2b397c406c 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -227,6 +227,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_fsc", "src\tool_fsharp EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.MSBuildSdkResolver", "src\Microsoft.DotNet.MSBuildSdkResolver\Microsoft.DotNet.MSBuildSdkResolver.csproj", "{FCDFAF40-CC16-4D49-96C0-E49F195E7142}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-cli-build.Tests", "build_projects\dotnet-cli-build.Tests\dotnet-cli-build.Tests.csproj", "{84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1563,6 +1565,30 @@ Global {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x64.Build.0 = Release|Any CPU {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU {FCDFAF40-CC16-4D49-96C0-E49F195E7142}.RelWithDebInfo|x86.Build.0 = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|x64.ActiveCfg = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|x64.Build.0 = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|x86.ActiveCfg = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Debug|x86.Build.0 = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|x86.ActiveCfg = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.MinSizeRel|x86.Build.0 = Debug|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|Any CPU.Build.0 = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|x64.ActiveCfg = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|x64.Build.0 = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|x86.ActiveCfg = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.Release|x86.Build.0 = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94}.RelWithDebInfo|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1633,6 +1659,7 @@ Global {08A40B6A-F695-4EA9-AC8D-CF88FADEA796} = {17735A9D-BFD9-4585-A7CB-3208CA6EA8A7} {602976C5-2477-4B4C-AD9A-1EAFB250529A} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {FCDFAF40-CC16-4D49-96C0-E49F195E7142} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} + {84BB2DD5-B2D8-4C85-AAF9-29D2A74FBF94} = {88278B81-7649-45DC-8A6A-D3A645C5AFC3} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B526D2CE-EE2D-4AD4-93EF-1867D90FF1F5} diff --git a/build/Microsoft.DotNet.Cli.tasks b/build/Microsoft.DotNet.Cli.tasks index 901a48f846..6ada95a1cc 100644 --- a/build/Microsoft.DotNet.Cli.tasks +++ b/build/Microsoft.DotNet.Cli.tasks @@ -32,6 +32,7 @@ + diff --git a/build/publish/PublishDebian.targets b/build/publish/PublishDebian.targets index 43ab5abdac..6dd7771805 100644 --- a/build/publish/PublishDebian.targets +++ b/build/publish/PublishDebian.targets @@ -5,29 +5,24 @@ - $(DotnetBlobRootUrl)/$(Product)/$(FullNugetVersion)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension) - $(SdkDebianIntermediateDirectory)/package_upload.json - 1 - - - { - "name":"$(SdkDebianPackageName)", - "version":"$(NugetVersion)-$(DebianRevisionNumber)", - "repositoryId":"$(REPO_ID)", - "sourceUrl": "$(SdkDebianUploadUrl)" - } - + $(DotnetBlobRootUrl)/$(Product)/$(FullNugetVersion)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-$(Architecture)$(InstallerExtension) - - - - - - - - + + + + + - + diff --git a/build_projects/dotnet-cli-build.Tests/GivenActionAndRetryTimes.cs b/build_projects/dotnet-cli-build.Tests/GivenActionAndRetryTimes.cs new file mode 100644 index 0000000000..47c83e0a72 --- /dev/null +++ b/build_projects/dotnet-cli-build.Tests/GivenActionAndRetryTimes.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using FluentAssertions; +using Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository; +using Xunit; + +namespace dotnet_cli_build.Tests +{ + public class GivenActionAndRetryTimes + { + public static IEnumerable NoWaitTimer() + { + while (true) + { + yield return Task.CompletedTask; + } + } + + [Fact] + public void ExponentialRetryShouldProvideIntervalSequence() + { + ExponentialRetry.Intervals.First().Should().Be(TimeSpan.FromSeconds(5)); + ExponentialRetry.Intervals.Skip(1).First().Should().Be(TimeSpan.FromSeconds(10)); + ExponentialRetry.Intervals.Skip(2).First().Should().Be(TimeSpan.FromSeconds(20)); + ExponentialRetry.Intervals.Skip(3).First().Should().Be(TimeSpan.FromSeconds(40)); + ExponentialRetry.Intervals.Skip(4).First().Should().Be(TimeSpan.FromSeconds(80)); + } + + [Fact] + public void ExponentialShouldNotRetryAfterFirstSucceess() + { + var fakeAction = new FakeAction(0); + ExponentialRetry.ExecuteWithRetry( + fakeAction.Run, + s => s == "success", + 10, + NoWaitTimer).Wait(); + fakeAction.Count.Should().Be(0); + } + + [Fact] + public void ExponentialShouldRetryUntilSuccess() + { + var fakeAction = new FakeAction(5); + ExponentialRetry.ExecuteWithRetry( + fakeAction.Run, + s => s == "success", + 10, + NoWaitTimer).Wait(); + fakeAction.Count.Should().Be(5); + } + + [Fact] + public void ExponentialShouldThrowAfterMaximumAmountReached() + { + var fakeAction = new FakeAction(10); + Action a = () => ExponentialRetry.ExecuteWithRetry( + fakeAction.Run, + s => s == "success", + 5, + NoWaitTimer, + "testing retry").Wait(); + a.ShouldThrow() + .WithMessage("Retry failed for testing retry after 5 times with result: fail"); + } + } + + public class FakeAction + { + private readonly int _successAfter; + + public FakeAction(int successAfter) + { + _successAfter = successAfter; + } + + public int Count { get; private set; } + + public Task Run() + { + if (_successAfter == Count) + { + return Task.FromResult("success"); + } + + Count++; + return Task.FromResult("fail"); + } + } +} \ No newline at end of file diff --git a/build_projects/dotnet-cli-build.Tests/dotnet-cli-build.Tests.csproj b/build_projects/dotnet-cli-build.Tests/dotnet-cli-build.Tests.csproj new file mode 100644 index 0000000000..e28340dda3 --- /dev/null +++ b/build_projects/dotnet-cli-build.Tests/dotnet-cli-build.Tests.csproj @@ -0,0 +1,22 @@ + + + + + $(CliTargetFramework) + 1.0.0 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81 + false + + + + + + + + + + + + + + diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/AddPackageStrategy.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/AddPackageStrategy.cs new file mode 100644 index 0000000000..cb2ec81013 --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/AddPackageStrategy.cs @@ -0,0 +1,62 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using NuGet.Protocol; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class AddPackageStrategy : IAzurelinuxRepositoryServiceHttpStrategy + { + private readonly IdInRepositoryService _idInRepositoryService; + private readonly string _packageName; + private readonly string _packageVersion; + private readonly string _repositoryId; + + public AddPackageStrategy( + IdInRepositoryService idInRepositoryService, + string packageName, + string packageVersion, + string repositoryId) + { + _idInRepositoryService = idInRepositoryService + ?? throw new ArgumentNullException(nameof(idInRepositoryService)); + _packageName = packageName; + _packageVersion = packageVersion; + _repositoryId = repositoryId; + } + + public async Task Execute(HttpClient client, Uri baseAddress) + { + var debianUploadJsonContent = new Dictionary + { + ["name"] = _packageName, + ["version"] = AppendDebianRevisionNumber(_packageVersion), + ["fileId"] = _idInRepositoryService.Id, + ["repositoryId"] = _repositoryId + }.ToJson(); + var content = new StringContent(debianUploadJsonContent, + Encoding.UTF8, + "application/json"); + + using (var response = await client.PostAsync(new Uri(baseAddress, "/v1/packages"), content)) + { + if (!response.IsSuccessStatusCode) + throw new FailedToAddPackageToPackageRepositoryException( + $"request:{debianUploadJsonContent} response:{response.ToJson()}"); + return response.Headers.GetValues("Location").Single(); + } + } + + private static string AppendDebianRevisionNumber(string packageVersion) + { + return packageVersion + "-1"; + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/ExponentialRetry.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/ExponentialRetry.cs new file mode 100644 index 0000000000..df3590940d --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/ExponentialRetry.cs @@ -0,0 +1,53 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + public static class ExponentialRetry + { + public static IEnumerable Intervals + { + get + { + var seconds = 5; + while (true) + { + yield return TimeSpan.FromSeconds(seconds); + seconds *= 2; + } + } + } + + public static async Task ExecuteWithRetry(Func> action, + Func isSuccess, + int maxRetryCount, + Func> timer, + string taskDescription = "") + { + var count = 0; + foreach (var t in timer()) + { + await t; + var result = await action(); + if (isSuccess(result)) + return; + count++; + if (count == maxRetryCount) + throw new RetryFailedException( + $"Retry failed for {taskDescription} after {count} times with result: {result}"); + } + throw new Exception("Timer should not be exhausted"); + } + + public static IEnumerable Timer(IEnumerable interval) + { + return interval.Select(Task.Delay); + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FailedToAddPackageToPackageRepositoryException.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FailedToAddPackageToPackageRepositoryException.cs new file mode 100644 index 0000000000..68c314c08c --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FailedToAddPackageToPackageRepositoryException.cs @@ -0,0 +1,24 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + public class FailedToAddPackageToPackageRepositoryException : Exception + { + public FailedToAddPackageToPackageRepositoryException(string message) : base(message) + { + } + + public FailedToAddPackageToPackageRepositoryException() + { + } + + public FailedToAddPackageToPackageRepositoryException(string message, Exception innerException) : base(message, + innerException) + { + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FileUploadStrategy.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FileUploadStrategy.cs new file mode 100644 index 0000000000..59be2c16c7 --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/FileUploadStrategy.cs @@ -0,0 +1,49 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Net.Http; +using System.Threading.Tasks; +using NuGet.Protocol; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class FileUploadStrategy : IAzurelinuxRepositoryServiceHttpStrategy + { + private readonly string _pathToPackageToUpload; + + public FileUploadStrategy(string pathToPackageToUpload) + { + _pathToPackageToUpload = pathToPackageToUpload + ?? throw new ArgumentNullException(nameof(pathToPackageToUpload)); + } + + public async Task Execute(HttpClient client, Uri baseAddress) + { + var fileName = Path.GetFileName(_pathToPackageToUpload); + + using (var content = + new MultipartFormDataContent()) + { + var url = new Uri(baseAddress, "/v1/files"); + content.Add( + new StreamContent( + new MemoryStream( + File.ReadAllBytes(_pathToPackageToUpload))), + "file", + fileName); + using (var message = await client.PostAsync(url, content)) + { + if (!message.IsSuccessStatusCode) + { + throw new FailedToAddPackageToPackageRepositoryException( + $"{message.ToJson()} failed to post file to {url} file name:{fileName} pathToPackageToUpload:{_pathToPackageToUpload}"); + } + return await message.Content.ReadAsStringAsync(); + } + } + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IAzurelinuxRepositoryServiceHttpStrategy.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IAzurelinuxRepositoryServiceHttpStrategy.cs new file mode 100644 index 0000000000..a829f398a3 --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IAzurelinuxRepositoryServiceHttpStrategy.cs @@ -0,0 +1,15 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Net.Http; +using System.Threading.Tasks; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal interface IAzurelinuxRepositoryServiceHttpStrategy + { + Task Execute(HttpClient client, Uri baseAddress); + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IdInRepositoryService.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IdInRepositoryService.cs new file mode 100644 index 0000000000..b51ebb3bef --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/IdInRepositoryService.cs @@ -0,0 +1,18 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class IdInRepositoryService + { + public IdInRepositoryService(string id) + { + Id = id ?? throw new ArgumentNullException(nameof(id)); + } + + public string Id { get; } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryDestiny.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryDestiny.cs new file mode 100644 index 0000000000..aa2e6d9bc6 --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryDestiny.cs @@ -0,0 +1,38 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class LinuxPackageRepositoryDestiny + { + private readonly string _password; + private readonly string _server; + private readonly string _username; + + public LinuxPackageRepositoryDestiny(string username, + string password, + string server, + string repositoryId) + { + _username = username ?? throw new ArgumentNullException(nameof(username)); + _password = password ?? throw new ArgumentNullException(nameof(password)); + _server = server ?? throw new ArgumentNullException(nameof(server)); + RepositoryId = repositoryId ?? throw new ArgumentNullException(nameof(repositoryId)); + } + + public string RepositoryId { get; } + + public Uri GetBaseAddress() + { + return new Uri($"https://{_server}"); + } + + public string GetSimpleAuth() + { + return $"{_username}:{_password}"; + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryHttpPrepare.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryHttpPrepare.cs new file mode 100644 index 0000000000..7e1f9ade71 --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/LinuxPackageRepositoryHttpPrepare.cs @@ -0,0 +1,46 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading.Tasks; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class LinuxPackageRepositoryHttpPrepare + { + private readonly IAzurelinuxRepositoryServiceHttpStrategy _httpStrategy; + private readonly LinuxPackageRepositoryDestiny _linuxPackageRepositoryDestiny; + + public LinuxPackageRepositoryHttpPrepare( + LinuxPackageRepositoryDestiny linuxPackageRepositoryDestiny, + IAzurelinuxRepositoryServiceHttpStrategy httpStrategy + ) + { + _linuxPackageRepositoryDestiny = linuxPackageRepositoryDestiny + ?? throw new ArgumentNullException(nameof(linuxPackageRepositoryDestiny)); + _httpStrategy = httpStrategy ?? throw new ArgumentNullException(nameof(httpStrategy)); + } + + public async Task RemoteCall() + { + using (var handler = new HttpClientHandler()) + { + using (var client = new HttpClient(handler)) + { + var authHeader = + Convert.ToBase64String(Encoding.UTF8.GetBytes((string) _linuxPackageRepositoryDestiny.GetSimpleAuth())); + client.DefaultRequestHeaders.Authorization = + new AuthenticationHeaderValue("Basic", authHeader); + client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); + client.Timeout = TimeSpan.FromMinutes(10); + + return await _httpStrategy.Execute(client, _linuxPackageRepositoryDestiny.GetBaseAddress()); + } + } + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/PullQueuedPackageStatus.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/PullQueuedPackageStatus.cs new file mode 100644 index 0000000000..393a160aee --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/PullQueuedPackageStatus.cs @@ -0,0 +1,34 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Net.Http; +using System.Threading.Tasks; +using Newtonsoft.Json.Linq; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class PullQueuedPackageStatus : IAzurelinuxRepositoryServiceHttpStrategy + { + private readonly QueueResourceLocation _queueResourceLocation; + + public PullQueuedPackageStatus(QueueResourceLocation queueResourceLocation) + { + _queueResourceLocation = queueResourceLocation + ?? throw new ArgumentNullException(nameof(queueResourceLocation)); + } + + public async Task Execute(HttpClient client, Uri baseAddress) + { + using (var response = await client.GetAsync(new Uri(baseAddress, _queueResourceLocation.Location))) + { + if (!response.IsSuccessStatusCode) + throw new FailedToAddPackageToPackageRepositoryException( + "Failed to make request to " + _queueResourceLocation.Location); + var body = await response.Content.ReadAsStringAsync(); + return !body.Contains("status") ? "" : JObject.Parse(body)["status"].ToString(); + } + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/QueueResourceLocation.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/QueueResourceLocation.cs new file mode 100644 index 0000000000..cbf11e48dd --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/QueueResourceLocation.cs @@ -0,0 +1,18 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + internal class QueueResourceLocation + { + public QueueResourceLocation(string location) + { + Location = location ?? throw new ArgumentNullException(nameof(location)); + } + + public string Location { get; } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/RetryFailedException.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/RetryFailedException.cs new file mode 100644 index 0000000000..b251ec4b83 --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/RetryFailedException.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + public class RetryFailedException : Exception + { + public RetryFailedException(string message) : base(message) + { + } + + public RetryFailedException() + { + } + + public RetryFailedException(string message, Exception innerException) : base(message, innerException) + { + } + } +} diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs new file mode 100644 index 0000000000..3e14557d69 --- /dev/null +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs @@ -0,0 +1,108 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Build.Framework; +using Newtonsoft.Json.Linq; +using Task = Microsoft.Build.Utilities.Task; + +namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository +{ + public class UploadToLinuxPackageRepository : Task + { + /// + /// The Azure repository service user name. + /// + [Required] + public string Username { get; set; } + + /// + /// The Azure repository service Password. + /// + [Required] + public string Password { get; set; } + + /// + /// The Azure repository service URL ex: "tux-devrepo.corp.microsoft.com". + /// + [Required] + public string Server { get; set; } + + [Required] + public string RepositoryId { get; set; } + + [Required] + public string PathOfPackageToUpload { get; set; } + + [Required] + public string PackageNameInLinuxPackageRepository { get; set; } + + + [Required] + public string PackageVersionInLinuxPackageRepository { get; set; } + + + public override bool Execute() + { + ExecuteAsyncWithRetry().GetAwaiter().GetResult(); + return true; + } + + private async System.Threading.Tasks.Task ExecuteAsyncWithRetry() + { + await ExponentialRetry.ExecuteWithRetry( + UploadAndAddpackageAndEnsureItIsReady, + s => s == "", + maxRetryCount: 3, + timer: () => ExponentialRetry.Timer(ExponentialRetry.Intervals), + taskDescription: $"running {nameof(UploadAndAddpackageAndEnsureItIsReady)}"); + } + + private async Task UploadAndAddpackageAndEnsureItIsReady() + { + try + { + var linuxPackageRepositoryDestiny = + new LinuxPackageRepositoryDestiny(Username, Password, Server, RepositoryId); + var uploadResponse = await new LinuxPackageRepositoryHttpPrepare( + linuxPackageRepositoryDestiny, + new FileUploadStrategy(PathOfPackageToUpload)).RemoteCall(); + + var idInRepositoryService = new IdInRepositoryService(JObject.Parse(uploadResponse)["id"].ToString()); + + var addPackageResponse = await new LinuxPackageRepositoryHttpPrepare( + linuxPackageRepositoryDestiny, + new AddPackageStrategy( + idInRepositoryService, + PackageNameInLinuxPackageRepository, + PackageVersionInLinuxPackageRepository, + linuxPackageRepositoryDestiny.RepositoryId)).RemoteCall(); + + var queueResourceLocation = new QueueResourceLocation(addPackageResponse); + + Func> pullQueuedPackageStatus = new LinuxPackageRepositoryHttpPrepare( + linuxPackageRepositoryDestiny, + new PullQueuedPackageStatus(queueResourceLocation)).RemoteCall; + + await ExponentialRetry.ExecuteWithRetry( + pullQueuedPackageStatus, + s => s == "fileReady", + 5, + () => ExponentialRetry.Timer(ExponentialRetry.Intervals), + $"PullQueuedPackageStatus location: {queueResourceLocation.Location}"); + return ""; + } + catch (FailedToAddPackageToPackageRepositoryException e) + { + return e.ToString(); + } + catch (HttpRequestException e) + { + return e.ToString(); + } + } + } +} diff --git a/scripts/publish/repoapi_client.sh b/scripts/publish/repoapi_client.sh deleted file mode 100755 index 875210bff2..0000000000 --- a/scripts/publish/repoapi_client.sh +++ /dev/null @@ -1,194 +0,0 @@ -#!/bin/bash -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -# This is a VERY basic script for Create/Delete operations on repos and packages -# -# Environment Dependencies: -# $REPO_SERVER -# $REPO_USER -# $REPO_PASS - -cmd=$1 -urls=urls.txt -defaultPackageFile=new_package.json -defaultRepoFile=new_repo.json -repositoryId=$REPO_ID -server=$REPO_SERVER -user=$REPO_USER -pass=$REPO_PASS -protocol=https -port=443 -baseurl="$protocol://$user:$pass@$server:$port" - -echo $baseurl - -function BailIf -{ - if [ $1 -ne 0 ]; then - echo "Failure occurred communicating with $server" - exit 1 - fi -} - -# List packages, using $1 as a regex to filter results -function ListPackages -{ - curl -k "$baseurl/v1/packages" | sed 's/{/\n{/g' | egrep "$1" | sed 's/,/,\n/g' | sed 's/^"/\t"/g' - echo "" -} - -# Create a new Repo using the specified JSON file -function AddRepo -{ - repoFile=$1 - if [ -z $repoFile ]; then - echo "Error: Must specify a JSON-formatted file. Reference $defaultRepoFile.template" - exit 1 - fi - if [ ! -f $repoFile ]; then - echo "Error: Cannot create repo - $repoFile does not exist" - exit 1 - fi - packageUrl=$(grep "url" $repoFile | head -n 1 | awk '{print $2}' | tr -d ',') - echo "Creating new repo on $server [$packageUrl]" - curl -i -k "$baseurl/v1/repositories" --data @./$repoFile -H "Content-Type: application/json" - BailIf $? - echo "" -} - -# Upload a single package using the specified JSON file -function AddPackage -{ - packageFile=$1 - if [ -z $packageFile ]; then - echo "Error: Must specify a JSON-formatted file. Reference $defaultPackageFile.template" - exit 1 - fi - if [ ! -f $packageFile ]; then - echo "Error: Cannot add package - $packageFile does not exist" - exit 1 - fi - packageUrl=$(grep "sourceUrl" $packageFile | head -n 1 | awk '{print $2}') - echo "Adding package to $server [$packageUrl]" - curl -i -k "$baseurl/v1/packages" --data @$packageFile -H "Content-Type: application/json" - BailIf $? - echo "" -} - -# Upload a single package by dynamically creating a JSON file using a provided URL -function AddPackageByUrl -{ - # Parse URL - url=$(echo "$1") - if [ -z $url ]; then - return - fi - escapedUrl=$(echo "$url" | sed 's/\//\\\//g') - set -- "$1" - oldIFS=$IFS - IFS="/"; declare -a splitUrl=($*) - index=${#splitUrl[@]} - let "index -= 1" - filename=${splitUrl[$index]} - set -- "$filename" - IFS="_"; declare -a splitFile=($*) - IFS=$oldIFS - pkgName=${splitFile[0]} - pkgVer=${splitFile[1]} - if [ -z $pkgName ] || [ -z $pkgVer ]; then - echo "ERROR parsing $url" - return - fi - # Create Package .json file - cp $defaultPackageFile.template $defaultPackageFile - sed -i "s/PACKAGENAME/$pkgName/g" $defaultPackageFile - sed -i "s/PACKAGEVERSION/$pkgVer/g" $defaultPackageFile - sed -i "s/PACKAGEURL/$escapedUrl/g" $defaultPackageFile - sed -i "s/REPOSITORYID/$repositoryId/g" $defaultPackageFile - # Test that URL is ok - wget -q --spider "$url" - if [[ $? -eq 0 ]]; then - echo "Ready to upload $pkgName [$pkgVer]" - else - echo "ERROR testing URL $url" - return - fi - # Perform Upload - AddPackage $defaultPackageFile - # Cleanup - # rm $defaultPackageFile -} - -# Upload multiple packages by reading urls line-by-line from the specified file -function AddPackages -{ - urlFile=$1 - if [ -z $urlFile ]; then - echo "Error: Must specify a flat text file containing one or more URLs" - exit 1 - fi - if [ ! -f $urlFile ]; then - echo "Error: Cannot add packages. File $urlFile does not exist" - exit 1 - fi - for url in $(cat $urlFile); do - AddPackageByUrl "$url" - sleep 5 - done -} - -# Delete the specified repo -function DeleteRepo -{ - repoId=$1 - if [ -z $repoId ]; then - echo "Error: Please specify repository ID. Run -listrepos for a list of IDs" - exit 1 - fi - curl -I -k -X DELETE "$baseurl/v1/repositories/$repoId" - BailIf $? -} - -# Delete the specified package -function DeletePackage -{ - packageId=$1 - if [ -z $packageId ]; then - echo "Error: Please specify package ID. Run -listpkgs for a list of IDs" - exit 1 - fi - echo Removing pkgId $packageId from repo $repositoryId - curl -I -k -X DELETE "$baseurl/v1/packages/$packageId" - BailIf $? -} - -if [[ "$1" == "-listrepos" ]]; then - echo "Fetching repo list from $server..." - curl -k "$baseurl/v1/repositories" | sed 's/,/,\n/g' | sed 's/^"/\t"/g' - echo "" -elif [[ "$1" == "-listpkgs" ]]; then - echo "Fetching package list from $server" - ListPackages $2 -elif [[ "$1" == "-addrepo" ]]; then - AddRepo $2 -elif [[ "$1" == "-addpkg" ]]; then - AddPackage $2 -elif [[ "$1" == "-addpkgs" ]]; then - AddPackages $2 -elif [[ "$1" == "-delrepo" ]]; then - DeleteRepo $2 -elif [[ "$1" == "-delpkg" ]]; then - DeletePackage $2 -else - echo "USAGE: ./repotool.sh -OPTION" - echo "-listrepos: Gather a list of repos" - echo "-listpkgs: Gather a list of packages" - echo "-addrepo [FILENAME] : Create a new repo using the specified JSON file" - echo "-addpkg [FILENAME] : Add package to repo using the specified JSON file" - echo "-addpkgs [FILENAME] : Add packages to repo using urls contained in FILENAME" - echo "-delrepo REPOID : Delete the specified repo by ID" - echo "-delpkg PKGID : Delete the specified package by ID" -fi From 36ee426998fca5f183fc08139256bcffd6866376 Mon Sep 17 00:00:00 2001 From: William Li Date: Thu, 31 Aug 2017 12:17:11 -0700 Subject: [PATCH 09/35] Port #7571 from master to 2.0.x Add log to UploadToLinuxPackageRepository (cherry picked from commit 8b8aef7e4496a75a46dcefef8082e3b54b20ccca) --- .../UploadToLinuxPackageRepository.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs index 3e14557d69..00099bd140 100644 --- a/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs +++ b/build_projects/dotnet-cli-build/UploadToLinuxPackageRepository/UploadToLinuxPackageRepository.cs @@ -65,6 +65,13 @@ private async Task UploadAndAddpackageAndEnsureItIsReady() { try { + Log.LogMessage( + MessageImportance.High, + "Begin uploading Linux Package to feed service, RepositoryId {0}, Server {1}, Package to upload {2}.", + RepositoryId, + Server, + PathOfPackageToUpload); + var linuxPackageRepositoryDestiny = new LinuxPackageRepositoryDestiny(Username, Password, Server, RepositoryId); var uploadResponse = await new LinuxPackageRepositoryHttpPrepare( @@ -93,6 +100,12 @@ await ExponentialRetry.ExecuteWithRetry( 5, () => ExponentialRetry.Timer(ExponentialRetry.Intervals), $"PullQueuedPackageStatus location: {queueResourceLocation.Location}"); + + Log.LogMessage( + MessageImportance.High, + "Upload to feed service is completed, queue resource location {0}", + queueResourceLocation.Location); + return ""; } catch (FailedToAddPackageToPackageRepositoryException e) From 8385d371856013873e164a631a2834f975f2dcf9 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 4 Aug 2017 00:24:48 -0700 Subject: [PATCH 10/35] Move dir.props to auto-imported Directory.Build.props This is necessary for setting the intermediate output path to work correctly (cherry picked from commit ae0aa8ed246ab22a74a3e9e1b1a4c9d339661f12) --- dir.props => Directory.Build.props | 15 +++++++++++++++ artifacts/Directory.Build.props | 3 +++ build/BundledTemplates.proj | 1 - build/package/dotnet-deb-tool-consumer.csproj | 2 -- .../Microsoft.DotNet.Cli.Build.Framework.csproj | 1 - .../InvokeWithStage0.proj | 1 - .../dotnet-cli-build/dotnet-cli-build.csproj | 1 - .../shared-build-targets-utils.csproj | 1 - .../Microsoft.DotNet.Archive.csproj | 1 - .../Microsoft.DotNet.Cli.Sln.Internal.csproj | 1 - .../Microsoft.DotNet.Cli.Utils.csproj | 1 - .../Microsoft.DotNet.Configurer.csproj | 1 - .../Microsoft.DotNet.InternalAbstractions.csproj | 1 - .../Microsoft.DotNet.MSBuildSdkResolver.csproj | 1 - .../Microsoft.DotNet.TestFramework.csproj | 1 - src/dotnet/dotnet.csproj | 1 - src/redist/redist.csproj | 1 - src/tool_fsharp/tool_fsc.csproj | 1 - src/tool_msbuild/tool_msbuild.csproj | 1 - src/tool_nuget/tool_nuget.csproj | 1 - src/tool_roslyn/tool_roslyn.csproj | 1 - .../ArgumentForwardingTests.csproj | 1 - test/ArgumentsReflector/ArgumentsReflector.csproj | 1 - test/EndToEnd/EndToEnd.csproj | 2 -- .../Microsoft.DotNet.Cli.Msi.Tests.csproj | 2 -- ...Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj | 2 -- .../Microsoft.DotNet.Cli.Utils.Tests.csproj | 2 -- .../Microsoft.DotNet.Configurer.UnitTests.csproj | 2 -- ...crosoft.DotNet.MSBuildSdkResolver.Tests.csproj | 2 -- .../Microsoft.DotNet.Tools.Tests.Utilities.csproj | 2 -- .../Msbuild.Tests.Utilities.csproj | 2 -- .../binding-redirects.Tests.csproj | 1 - test/crossgen.Tests/crossgen.Tests.csproj | 1 - .../dotnet-add-package.Tests.csproj | 2 -- .../dotnet-add-reference.Tests.csproj | 1 - .../dotnet-back-compat.Tests.csproj | 2 -- test/dotnet-build.Tests/dotnet-build.Tests.csproj | 1 - test/dotnet-clean.Tests/dotnet-clean.Tests.csproj | 2 -- test/dotnet-help.Tests/dotnet-help.Tests.csproj | 2 -- .../dotnet-list-reference.Tests.csproj | 2 -- .../dotnet-migrate.Tests.csproj | 2 -- .../dotnet-msbuild.Tests.csproj | 2 -- test/dotnet-new.Tests/dotnet-new.Tests.csproj | 2 -- .../dotnet-nuget.UnitTests.csproj | 2 -- test/dotnet-pack.Tests/dotnet-pack.Tests.csproj | 2 -- .../dotnet-publish.Tests.csproj | 2 -- .../dotnet-remove-package.Tests.csproj | 2 -- .../dotnet-remove-reference.Tests.csproj | 2 -- .../dotnet-restore.Tests.csproj | 2 -- test/dotnet-run.Tests/dotnet-run.Tests.csproj | 2 -- .../dotnet-sln-add.Tests.csproj | 2 -- .../dotnet-sln-list.Tests.csproj | 2 -- .../dotnet-sln-remove.Tests.csproj | 2 -- test/dotnet-store.Tests/dotnet-store.Tests.csproj | 2 -- test/dotnet-test.Tests/dotnet-test.Tests.csproj | 2 -- .../dotnet-vstest.Tests.csproj | 2 -- test/dotnet.Tests/dotnet.Tests.csproj | 1 - .../msbuild.IntegrationTests.csproj | 2 -- .../CrossGen.Dependencies.csproj | 2 -- .../Signing.Dependencies.csproj | 2 -- 60 files changed, 18 insertions(+), 91 deletions(-) rename dir.props => Directory.Build.props (83%) create mode 100644 artifacts/Directory.Build.props diff --git a/dir.props b/Directory.Build.props similarity index 83% rename from dir.props rename to Directory.Build.props index 756fccc32e..02d0b04065 100644 --- a/dir.props +++ b/Directory.Build.props @@ -1,5 +1,20 @@ + + $(MSBuildThisFileDirectory) diff --git a/artifacts/Directory.Build.props b/artifacts/Directory.Build.props new file mode 100644 index 0000000000..905549edcb --- /dev/null +++ b/artifacts/Directory.Build.props @@ -0,0 +1,3 @@ + + + diff --git a/build/BundledTemplates.proj b/build/BundledTemplates.proj index 014f5bc92d..f9d7301078 100644 --- a/build/BundledTemplates.proj +++ b/build/BundledTemplates.proj @@ -1,5 +1,4 @@ - - - netcoreapp2.0 $(CLI_SharedFrameworkVersion) diff --git a/build_projects/Microsoft.DotNet.Cli.Build.Framework/Microsoft.DotNet.Cli.Build.Framework.csproj b/build_projects/Microsoft.DotNet.Cli.Build.Framework/Microsoft.DotNet.Cli.Build.Framework.csproj index dd2f94e918..fefc8affe9 100644 --- a/build_projects/Microsoft.DotNet.Cli.Build.Framework/Microsoft.DotNet.Cli.Build.Framework.csproj +++ b/build_projects/Microsoft.DotNet.Cli.Build.Framework/Microsoft.DotNet.Cli.Build.Framework.csproj @@ -1,5 +1,4 @@  - netstandard1.5 diff --git a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj index 6a85183ca4..0b16d4b630 100644 --- a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj +++ b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj @@ -1,5 +1,4 @@ - diff --git a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj index 5186a2ee04..dd5e0c8e45 100644 --- a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj +++ b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj @@ -1,5 +1,4 @@ - Build scripts for dotnet-cli 1.0.0 diff --git a/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj b/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj index 14a4c4a33a..ed7002589a 100644 --- a/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj +++ b/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj @@ -1,5 +1,4 @@  - Build scripts for dotnet-cli diff --git a/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj b/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj index 04b8f25be4..0fec393cb5 100644 --- a/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj +++ b/src/Microsoft.DotNet.Archive/Microsoft.DotNet.Archive.csproj @@ -1,5 +1,4 @@  - Archive and compression types. diff --git a/src/Microsoft.DotNet.Cli.Sln.Internal/Microsoft.DotNet.Cli.Sln.Internal.csproj b/src/Microsoft.DotNet.Cli.Sln.Internal/Microsoft.DotNet.Cli.Sln.Internal.csproj index 2b23027fd2..8f76e2e04b 100644 --- a/src/Microsoft.DotNet.Cli.Sln.Internal/Microsoft.DotNet.Cli.Sln.Internal.csproj +++ b/src/Microsoft.DotNet.Cli.Sln.Internal/Microsoft.DotNet.Cli.Sln.Internal.csproj @@ -1,5 +1,4 @@  - SLN file reader/writer diff --git a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj index fec257bddd..600794faf9 100644 --- a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj +++ b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj @@ -1,5 +1,4 @@  - $(SdkVersion) diff --git a/src/Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj b/src/Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj index 25a33c6f8a..49f4fceb5b 100644 --- a/src/Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj +++ b/src/Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj @@ -1,5 +1,4 @@  - $(CliVersionPrefix) diff --git a/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj b/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj index a5c6d9d6a4..c4c930565e 100644 --- a/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj +++ b/src/Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj @@ -1,5 +1,4 @@  - Abstractions for making code that uses file system and environment testable. diff --git a/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj b/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj index ca8867c759..55d357272d 100644 --- a/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj +++ b/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj @@ -1,5 +1,4 @@  - $(SdkVersion) diff --git a/src/Microsoft.DotNet.TestFramework/Microsoft.DotNet.TestFramework.csproj b/src/Microsoft.DotNet.TestFramework/Microsoft.DotNet.TestFramework.csproj index 4e9b4a96f7..2996edcbb6 100644 --- a/src/Microsoft.DotNet.TestFramework/Microsoft.DotNet.TestFramework.csproj +++ b/src/Microsoft.DotNet.TestFramework/Microsoft.DotNet.TestFramework.csproj @@ -1,5 +1,4 @@  - Microsoft.DotNet.TestFramework Class Library diff --git a/src/dotnet/dotnet.csproj b/src/dotnet/dotnet.csproj index e5f36bff34..4f74cc2bfa 100644 --- a/src/dotnet/dotnet.csproj +++ b/src/dotnet/dotnet.csproj @@ -1,5 +1,4 @@  - $(SdkVersion) $(CliTargetFramework) diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index 39458acffb..e3fc14baa6 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -1,5 +1,4 @@  - diff --git a/src/tool_fsharp/tool_fsc.csproj b/src/tool_fsharp/tool_fsc.csproj index d8fb482462..ddc23506f9 100644 --- a/src/tool_fsharp/tool_fsc.csproj +++ b/src/tool_fsharp/tool_fsc.csproj @@ -1,5 +1,4 @@  - diff --git a/src/tool_msbuild/tool_msbuild.csproj b/src/tool_msbuild/tool_msbuild.csproj index 7a109b08dc..19cf5b7ea9 100644 --- a/src/tool_msbuild/tool_msbuild.csproj +++ b/src/tool_msbuild/tool_msbuild.csproj @@ -1,5 +1,4 @@  - $(CliVersionPrefix) diff --git a/src/tool_nuget/tool_nuget.csproj b/src/tool_nuget/tool_nuget.csproj index 5a4e4121f1..9d00b23cb7 100644 --- a/src/tool_nuget/tool_nuget.csproj +++ b/src/tool_nuget/tool_nuget.csproj @@ -1,5 +1,4 @@  - $(CliVersionPrefix) diff --git a/src/tool_roslyn/tool_roslyn.csproj b/src/tool_roslyn/tool_roslyn.csproj index ee6a775227..da856495c1 100644 --- a/src/tool_roslyn/tool_roslyn.csproj +++ b/src/tool_roslyn/tool_roslyn.csproj @@ -1,5 +1,4 @@  - diff --git a/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj index a6773725fa..31c4e1075a 100644 --- a/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj +++ b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj @@ -1,5 +1,4 @@  - $(CliTargetFramework) diff --git a/test/ArgumentsReflector/ArgumentsReflector.csproj b/test/ArgumentsReflector/ArgumentsReflector.csproj index 4ad634f310..012295b52d 100644 --- a/test/ArgumentsReflector/ArgumentsReflector.csproj +++ b/test/ArgumentsReflector/ArgumentsReflector.csproj @@ -1,5 +1,4 @@  - $(CliTargetFramework) diff --git a/test/EndToEnd/EndToEnd.csproj b/test/EndToEnd/EndToEnd.csproj index 19586cb7d7..5eb588bef8 100644 --- a/test/EndToEnd/EndToEnd.csproj +++ b/test/EndToEnd/EndToEnd.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj b/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj index b3675ea9d4..17220aaf13 100644 --- a/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj +++ b/test/Installer/Microsoft.DotNet.Cli.Msi.Tests/Microsoft.DotNet.Cli.Msi.Tests.csproj @@ -1,6 +1,4 @@  - - net46 true diff --git a/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj b/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj index 7f0760ef80..7a3b12d4c9 100644 --- a/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj +++ b/test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj @@ -1,6 +1,4 @@ - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj index 2642b4ada1..63ddee9010 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj b/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj index 4b47565124..2511c7eae6 100644 --- a/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj +++ b/test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj b/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj index a21bb47312..b60f6abe6d 100644 --- a/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj +++ b/test/Microsoft.DotNet.MSBuildSdkResolver.Tests/Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj b/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj index 7671292631..c66ed46754 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj @@ -1,6 +1,4 @@  - - Microsoft.DotNet.Tools.Tests.Utilities Class Library netstandard1.5 diff --git a/test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj b/test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj index 032ba74328..575d468705 100644 --- a/test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj +++ b/test/Msbuild.Tests.Utilities/Msbuild.Tests.Utilities.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/binding-redirects.Tests/binding-redirects.Tests.csproj b/test/binding-redirects.Tests/binding-redirects.Tests.csproj index e979f1d7b7..f8ba58ef93 100644 --- a/test/binding-redirects.Tests/binding-redirects.Tests.csproj +++ b/test/binding-redirects.Tests/binding-redirects.Tests.csproj @@ -1,5 +1,4 @@  - $(CliTargetFramework) diff --git a/test/crossgen.Tests/crossgen.Tests.csproj b/test/crossgen.Tests/crossgen.Tests.csproj index ffd348ff1e..1849d59951 100644 --- a/test/crossgen.Tests/crossgen.Tests.csproj +++ b/test/crossgen.Tests/crossgen.Tests.csproj @@ -1,5 +1,4 @@  - $(CliTargetFramework) diff --git a/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj b/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj index 5185599024..cb759125c9 100644 --- a/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj +++ b/test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj @@ -1,6 +1,4 @@ - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj b/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj index 744ed0798c..2159632fca 100644 --- a/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj +++ b/test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj @@ -1,5 +1,4 @@  - $(CliTargetFramework) diff --git a/test/dotnet-back-compat.Tests/dotnet-back-compat.Tests.csproj b/test/dotnet-back-compat.Tests/dotnet-back-compat.Tests.csproj index 3f55e51097..5e9a3b3046 100644 --- a/test/dotnet-back-compat.Tests/dotnet-back-compat.Tests.csproj +++ b/test/dotnet-back-compat.Tests/dotnet-back-compat.Tests.csproj @@ -1,6 +1,4 @@ - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-build.Tests/dotnet-build.Tests.csproj b/test/dotnet-build.Tests/dotnet-build.Tests.csproj index 98d275251b..3475413bc2 100644 --- a/test/dotnet-build.Tests/dotnet-build.Tests.csproj +++ b/test/dotnet-build.Tests/dotnet-build.Tests.csproj @@ -1,5 +1,4 @@  - $(CliTargetFramework) diff --git a/test/dotnet-clean.Tests/dotnet-clean.Tests.csproj b/test/dotnet-clean.Tests/dotnet-clean.Tests.csproj index b1183fbac8..598fee5cfa 100644 --- a/test/dotnet-clean.Tests/dotnet-clean.Tests.csproj +++ b/test/dotnet-clean.Tests/dotnet-clean.Tests.csproj @@ -1,6 +1,4 @@ - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-help.Tests/dotnet-help.Tests.csproj b/test/dotnet-help.Tests/dotnet-help.Tests.csproj index e14909b1d6..2200ed754f 100644 --- a/test/dotnet-help.Tests/dotnet-help.Tests.csproj +++ b/test/dotnet-help.Tests/dotnet-help.Tests.csproj @@ -1,6 +1,4 @@ - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj b/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj index e3f183fe19..c8cbdc0bcb 100644 --- a/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj +++ b/test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj b/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj index 2a17335f77..e15451f829 100644 --- a/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj +++ b/test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj b/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj index e0c9b8258c..6259dcebee 100644 --- a/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj +++ b/test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-new.Tests/dotnet-new.Tests.csproj b/test/dotnet-new.Tests/dotnet-new.Tests.csproj index 6fc972c60b..6c74212af0 100644 --- a/test/dotnet-new.Tests/dotnet-new.Tests.csproj +++ b/test/dotnet-new.Tests/dotnet-new.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj b/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj index 41e6d7ee0e..4eb2c07947 100644 --- a/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj +++ b/test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj b/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj index 74ab88ecb3..a33adc3bb6 100644 --- a/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj +++ b/test/dotnet-pack.Tests/dotnet-pack.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj b/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj index cac4ae9c7b..31a4775692 100644 --- a/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj +++ b/test/dotnet-publish.Tests/dotnet-publish.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-remove-package.Tests/dotnet-remove-package.Tests.csproj b/test/dotnet-remove-package.Tests/dotnet-remove-package.Tests.csproj index 44dde6ca02..3d884fbd50 100644 --- a/test/dotnet-remove-package.Tests/dotnet-remove-package.Tests.csproj +++ b/test/dotnet-remove-package.Tests/dotnet-remove-package.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj b/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj index e8d6ae8938..4d571f9e4b 100644 --- a/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj +++ b/test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj b/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj index d1d9c2b56c..f92bf8f684 100644 --- a/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj +++ b/test/dotnet-restore.Tests/dotnet-restore.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-run.Tests/dotnet-run.Tests.csproj b/test/dotnet-run.Tests/dotnet-run.Tests.csproj index 8264e6589d..e00d11b488 100644 --- a/test/dotnet-run.Tests/dotnet-run.Tests.csproj +++ b/test/dotnet-run.Tests/dotnet-run.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj b/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj index c58b914c38..1095e98a49 100644 --- a/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj +++ b/test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj @@ -1,6 +1,4 @@ - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj b/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj index bbd6e14ae8..7ecf5b2a4b 100644 --- a/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj +++ b/test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj b/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj index 136a4d5a70..42c94f8d91 100644 --- a/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj +++ b/test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-store.Tests/dotnet-store.Tests.csproj b/test/dotnet-store.Tests/dotnet-store.Tests.csproj index 8ebe9ef7db..11e732e03b 100644 --- a/test/dotnet-store.Tests/dotnet-store.Tests.csproj +++ b/test/dotnet-store.Tests/dotnet-store.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-test.Tests/dotnet-test.Tests.csproj b/test/dotnet-test.Tests/dotnet-test.Tests.csproj index 5c89ff2f75..a69fe3555c 100644 --- a/test/dotnet-test.Tests/dotnet-test.Tests.csproj +++ b/test/dotnet-test.Tests/dotnet-test.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj b/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj index e63222e9e6..2601d659f4 100644 --- a/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj +++ b/test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/test/dotnet.Tests/dotnet.Tests.csproj b/test/dotnet.Tests/dotnet.Tests.csproj index f30b3f1315..20e165374a 100644 --- a/test/dotnet.Tests/dotnet.Tests.csproj +++ b/test/dotnet.Tests/dotnet.Tests.csproj @@ -1,5 +1,4 @@  - $(CliTargetFramework) diff --git a/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj b/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj index 67c66fb635..6f178d749e 100644 --- a/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj +++ b/test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj @@ -1,6 +1,4 @@  - - $(CliTargetFramework) $(CLI_SharedFrameworkVersion) diff --git a/tools/CrossGen.Dependencies/CrossGen.Dependencies.csproj b/tools/CrossGen.Dependencies/CrossGen.Dependencies.csproj index e29aa4cdb4..33051ba8eb 100644 --- a/tools/CrossGen.Dependencies/CrossGen.Dependencies.csproj +++ b/tools/CrossGen.Dependencies/CrossGen.Dependencies.csproj @@ -1,6 +1,4 @@  - - netcoreapp2.0 $(SharedFrameworkRid) diff --git a/tools/Signing.Dependencies/Signing.Dependencies.csproj b/tools/Signing.Dependencies/Signing.Dependencies.csproj index c98ee321a0..dc8cd6914b 100644 --- a/tools/Signing.Dependencies/Signing.Dependencies.csproj +++ b/tools/Signing.Dependencies/Signing.Dependencies.csproj @@ -1,6 +1,4 @@ - - netcoreapp1.0 From 2b134c91feaff78e987f1320e0a52d4dea34f1bd Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 9 Aug 2017 22:30:20 -0700 Subject: [PATCH 11/35] Support new artifacts layout in tests and other build logic (cherry picked from commit 13da2131835ca951d12900cce3edefe1fb9df12f) --- .../AppWithProjTool2Fx/App.csproj | 1 + .../AppWithProjTool2Fx/NuGet.Config | 6 ------ .../LibWithProjTool2Fx/Lib.csproj | 1 + .../LibWithProjTool2Fx/NuGet.Config | 6 ------ TestAssets/Directory.Build.props | 3 +++ TestAssets/TestPackages/NuGet.Config | 6 ------ .../11TestAppWith10CLIToolReferences.csproj | 1 + .../NuGet.Config | 6 ------ .../AppWithDirectDepWithOutputName.csproj | 1 + .../NuGet.Config | 8 -------- ...AppWithFallbackFolderToolDependency.csproj | 1 + .../NuGet.Config | 6 ------ .../DependencyContextFromTool.csproj | 1 + .../DependencyContextFromTool/NuGet.Config | 6 ------ .../TestAppWithProjDepTool/NuGet.Config | 6 ------ .../TestAppWithProjDepTool.csproj | 1 + build.proj | 2 +- build/BundledTemplates.proj | 1 + build/OutputDirectories.props | 2 +- build/Test.targets | 20 +++++++++---------- build/test/RunTest.proj | 7 ++++++- .../InvokeWithStage0.proj | 1 + dir.props | 4 ++++ src/redist/redist.csproj | 2 +- src/tool_fsharp/tool_fsc.csproj | 2 +- src/tool_roslyn/tool_roslyn.csproj | 2 +- .../ArgumentForwardingTests.csproj | 2 +- test/{dir.props => Directory.Build.props} | 2 +- .../Commands/TestCommand.cs | 3 +++ .../RepoDirectoriesProvider.cs | 13 ++++++++---- test/binding-redirects.Tests/NuGet.Config | 6 ------ .../binding-redirects.Tests.csproj | 1 + .../GivenThatIWantANewAppWithSpecifiedType.cs | 8 ++++++-- test/dotnet-new.Tests/dotnet-new.Tests.csproj | 5 +++++ test/dotnet.Tests/dotnet.Tests.csproj | 2 +- testAsset.props | 1 + 36 files changed, 64 insertions(+), 82 deletions(-) delete mode 100644 TestAssets/DesktopTestProjects/AppWithProjTool2Fx/NuGet.Config delete mode 100644 TestAssets/DesktopTestProjects/LibWithProjTool2Fx/NuGet.Config create mode 100644 TestAssets/Directory.Build.props delete mode 100644 TestAssets/TestPackages/NuGet.Config delete mode 100644 TestAssets/TestProjects/11TestAppWith10CLIToolReferences/NuGet.Config delete mode 100644 TestAssets/TestProjects/AppWithDirectDepWithOutputName/NuGet.Config delete mode 100644 TestAssets/TestProjects/AppWithFallbackFolderToolDependency/NuGet.Config delete mode 100644 TestAssets/TestProjects/DependencyContextFromTool/NuGet.Config delete mode 100644 TestAssets/TestProjects/TestAppWithProjDepTool/NuGet.Config create mode 100644 dir.props rename test/{dir.props => Directory.Build.props} (83%) delete mode 100644 test/binding-redirects.Tests/NuGet.Config diff --git a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj index f72d85fc60..6b6514fb3d 100644 --- a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj +++ b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/App.csproj @@ -6,6 +6,7 @@ Exe $(AssetTargetFallback);portable-net45+win8;dnxcore50 win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64 + $(TEST_PACKAGES) diff --git a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/NuGet.Config b/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/NuGet.Config deleted file mode 100644 index b8e876fcb7..0000000000 --- a/TestAssets/DesktopTestProjects/AppWithProjTool2Fx/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj index d57f09629f..bad19bf932 100644 --- a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj +++ b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/Lib.csproj @@ -3,6 +3,7 @@ netstandard1.6;net451 Library $(AssetTargetFallback);portable-net45+win8;dnxcore50;netcoreapp2.0 + $(TEST_PACKAGES) diff --git a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/NuGet.Config b/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/NuGet.Config deleted file mode 100644 index b8e876fcb7..0000000000 --- a/TestAssets/DesktopTestProjects/LibWithProjTool2Fx/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/Directory.Build.props b/TestAssets/Directory.Build.props new file mode 100644 index 0000000000..905549edcb --- /dev/null +++ b/TestAssets/Directory.Build.props @@ -0,0 +1,3 @@ + + + diff --git a/TestAssets/TestPackages/NuGet.Config b/TestAssets/TestPackages/NuGet.Config deleted file mode 100644 index 0750578cbd..0000000000 --- a/TestAssets/TestPackages/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj b/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj index 6dd25f7f65..c15ae1a16e 100644 --- a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj +++ b/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/11TestAppWith10CLIToolReferences.csproj @@ -4,6 +4,7 @@ Exe netcoreapp1.1 + $(TEST_PACKAGES) diff --git a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/NuGet.Config b/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/NuGet.Config deleted file mode 100644 index b8e876fcb7..0000000000 --- a/TestAssets/TestProjects/11TestAppWith10CLIToolReferences/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj b/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj index 5afb249219..3a99fed0d1 100755 --- a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj +++ b/TestAssets/TestProjects/AppWithDirectDepWithOutputName/AppWithDirectDepWithOutputName.csproj @@ -4,6 +4,7 @@ netcoreapp2.0 Exe + $(TEST_PACKAGES) diff --git a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/NuGet.Config b/TestAssets/TestProjects/AppWithDirectDepWithOutputName/NuGet.Config deleted file mode 100644 index 4da396ac8f..0000000000 --- a/TestAssets/TestProjects/AppWithDirectDepWithOutputName/NuGet.Config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj b/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj index 705cf20772..1410deeb46 100755 --- a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj +++ b/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/AppWithFallbackFolderToolDependency.csproj @@ -4,6 +4,7 @@ netcoreapp2.0 Exe + $(TEST_PACKAGES) diff --git a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/NuGet.Config b/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/NuGet.Config deleted file mode 100644 index b8e876fcb7..0000000000 --- a/TestAssets/TestProjects/AppWithFallbackFolderToolDependency/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj b/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj index 9c5447b059..4e7b4cd9de 100755 --- a/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj +++ b/TestAssets/TestProjects/DependencyContextFromTool/DependencyContextFromTool.csproj @@ -8,6 +8,7 @@ Exe false $(AssetTargetFallback);dnxcore50;portable-net45+win8 + $(TEST_PACKAGES) diff --git a/TestAssets/TestProjects/DependencyContextFromTool/NuGet.Config b/TestAssets/TestProjects/DependencyContextFromTool/NuGet.Config deleted file mode 100644 index b8e876fcb7..0000000000 --- a/TestAssets/TestProjects/DependencyContextFromTool/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/TestProjects/TestAppWithProjDepTool/NuGet.Config b/TestAssets/TestProjects/TestAppWithProjDepTool/NuGet.Config deleted file mode 100644 index b8e876fcb7..0000000000 --- a/TestAssets/TestProjects/TestAppWithProjDepTool/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj b/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj index 3f81767910..c5748e258e 100644 --- a/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj +++ b/TestAssets/TestProjects/TestAppWithProjDepTool/TestAppWithProjDepTool.csproj @@ -4,6 +4,7 @@ Exe netcoreapp2.0 + $(TEST_PACKAGES) diff --git a/build.proj b/build.proj index bac606d59c..41ab0f56a5 100644 --- a/build.proj +++ b/build.proj @@ -1,6 +1,6 @@ - + diff --git a/build/BundledTemplates.proj b/build/BundledTemplates.proj index f9d7301078..014f5bc92d 100644 --- a/build/BundledTemplates.proj +++ b/build/BundledTemplates.proj @@ -1,4 +1,5 @@ + $(BaseOutputDirectory)/AspRT $(IntermediateDirectory)/backwardsCompatibleSharedFrameworksPublish - $(RepoRoot)/artifacts/testpackages/ + $(BaseOutputDirectory)/testpackages/ $(OutputDirectory)/dotnet$(ExeExtension) $(IntermediateDirectory)/GeneratedMSBuildExtensions $(IntermediateDirectory)/MSBuildExtensionsLayout diff --git a/build/Test.targets b/build/Test.targets index 4fadf70e43..c8f4a88291 100644 --- a/build/Test.targets +++ b/build/Test.targets @@ -12,24 +12,20 @@ $(TestOutputDir)/results/ - - - - - - @(TestTaskEnvironmentVariables) - - + + + CLIBuildDll=$(CLIBuildDll); Configuration=$(Configuration); - EnvironmentVariables=$(RunTestEnvironmentVariables); + TestArtifactsDir=$(TestArtifactsDir); + TestPackagesDir=$(TestPackagesDir); TestProject=%(TestProjects.Identity); TestResultXmlDir=$(TestResultXmlDir); ToolPath=$(OutputDirectory); @@ -74,14 +70,16 @@ + ProjectPath="%(TestPackageProject.ProjectPath)" + AdditionalParameters="/p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages" + /> + MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion) /p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages" /> diff --git a/build/test/RunTest.proj b/build/test/RunTest.proj index 8b1ec899f6..cff315a141 100644 --- a/build/test/RunTest.proj +++ b/build/test/RunTest.proj @@ -11,7 +11,12 @@ - + + + + + + diff --git a/dir.props b/dir.props new file mode 100644 index 0000000000..995f5e985a --- /dev/null +++ b/dir.props @@ -0,0 +1,4 @@ + + + + diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index e3fc14baa6..d5a7ad5d42 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -1,5 +1,5 @@  - + diff --git a/src/tool_fsharp/tool_fsc.csproj b/src/tool_fsharp/tool_fsc.csproj index ddc23506f9..1ec0f52b58 100644 --- a/src/tool_fsharp/tool_fsc.csproj +++ b/src/tool_fsharp/tool_fsc.csproj @@ -1,5 +1,5 @@  - + $(CliVersionPrefix) diff --git a/src/tool_roslyn/tool_roslyn.csproj b/src/tool_roslyn/tool_roslyn.csproj index da856495c1..8049d3f4f4 100644 --- a/src/tool_roslyn/tool_roslyn.csproj +++ b/src/tool_roslyn/tool_roslyn.csproj @@ -1,5 +1,5 @@  - + $(CliVersionPrefix) diff --git a/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj index 31c4e1075a..ec1d27ff2e 100644 --- a/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj +++ b/test/ArgumentForwardingTests/ArgumentForwardingTests.csproj @@ -23,7 +23,7 @@ - + diff --git a/test/dir.props b/test/Directory.Build.props similarity index 83% rename from test/dir.props rename to test/Directory.Build.props index 8d5c8cc421..406c4f8c1e 100644 --- a/test/dir.props +++ b/test/Directory.Build.props @@ -1,5 +1,5 @@ - + false diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs index 03ee56d6c2..b8f3ca9cca 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/TestCommand.cs @@ -238,6 +238,9 @@ private void AddEnvironmentVariablesTo(ProcessStartInfo psi) psi.Environment[item.Key] = item.Value; #endif } + + // Flow the TEST_PACKAGES environment variable to the child process + psi.Environment["TEST_PACKAGES"] = System.Environment.GetEnvironmentVariable("TEST_PACKAGES"); } private void AddWorkingDirectoryTo(ProcessStartInfo psi) diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs index 2f5e1e8302..8f5fe78ff5 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs @@ -94,17 +94,22 @@ public RepoDirectoriesProvider( string corehostDummyPackages = null, string pjDotnet = null) { - _artifacts = artifacts ?? Path.Combine(RepoRoot, "artifacts", BuildRid); + _artifacts = artifacts ?? Path.Combine(RepoRoot, "artifacts", "stage2", BuildRid); _builtDotnet = builtDotnet ?? Path.Combine(_artifacts, "intermediate", "sharedFrameworkPublish"); _nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages"); _pjDotnet = pjDotnet ?? GetPjDotnetPath(); _stage2Sdk = Directory - .EnumerateDirectories(Path.Combine(_artifacts, "stage2", "sdk")) + .EnumerateDirectories(Path.Combine(_artifacts, "dotnet", "sdk")) .First(d => !d.Contains("NuGetFallbackFolder")); _stage2WithBackwardsCompatibleRuntimesDirectory = - Path.Combine(_artifacts, "stage2WithBackwardsCompatibleRuntimes"); - _testPackages = Path.Combine(RepoRoot, "artifacts", "testpackages", "packages"); + Path.Combine(_artifacts, "dotnetWithBackwardsCompatibleRuntimes"); + + _testPackages = Environment.GetEnvironmentVariable("TEST_PACKAGES"); + if (string.IsNullOrEmpty(_testPackages)) + { + throw new InvalidOperationException("TEST_PACKAGES environment variable not set"); + } } private string GetPjDotnetPath() diff --git a/test/binding-redirects.Tests/NuGet.Config b/test/binding-redirects.Tests/NuGet.Config deleted file mode 100644 index 507db39a69..0000000000 --- a/test/binding-redirects.Tests/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/test/binding-redirects.Tests/binding-redirects.Tests.csproj b/test/binding-redirects.Tests/binding-redirects.Tests.csproj index f8ba58ef93..c1a94e084c 100644 --- a/test/binding-redirects.Tests/binding-redirects.Tests.csproj +++ b/test/binding-redirects.Tests/binding-redirects.Tests.csproj @@ -6,6 +6,7 @@ true binding-redirects.Tests $(AssetTargetFallback);dotnet5.4;portable-net451+win8 + $(TestOutputDir)/packages diff --git a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs index 96bb47c519..b387814e9d 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs @@ -50,8 +50,12 @@ public void TemplateRestoresAndBuildsWithoutWarnings( if (useNuGetConfigForAspNet) { - var configFile = new FileInfo(Path.Combine(rootPath, "..", "..", "..", "..", "..", "NuGet.tempaspnetpatch.config")); - File.Copy(configFile.FullName, Path.Combine(rootPath, "NuGet.Config")); + string resourceName = "dotnet-new.Tests.NuGet.tempaspnetpatch.config"; + using (Stream input = typeof(GivenThatIWantANewAppWithSpecifiedType).Assembly.GetManifestResourceStream(resourceName)) + using (Stream output = File.OpenWrite(Path.Combine(rootPath, "NuGet.Config"))) + { + input.CopyTo(output); + } } if (skipSpaWebpackSteps) diff --git a/test/dotnet-new.Tests/dotnet-new.Tests.csproj b/test/dotnet-new.Tests/dotnet-new.Tests.csproj index 6c74212af0..133fd9730c 100644 --- a/test/dotnet-new.Tests/dotnet-new.Tests.csproj +++ b/test/dotnet-new.Tests/dotnet-new.Tests.csproj @@ -7,6 +7,11 @@ $(AssetTargetFallback);dnxcore50;portable-net45+win8 + + + + + diff --git a/test/dotnet.Tests/dotnet.Tests.csproj b/test/dotnet.Tests/dotnet.Tests.csproj index 20e165374a..a3863f7229 100644 --- a/test/dotnet.Tests/dotnet.Tests.csproj +++ b/test/dotnet.Tests/dotnet.Tests.csproj @@ -22,7 +22,7 @@ PreserveNewest PreserveNewest - + .version PreserveNewest diff --git a/testAsset.props b/testAsset.props index af559d0b49..b130414b81 100644 --- a/testAsset.props +++ b/testAsset.props @@ -1,6 +1,7 @@ + $(TEST_PACKAGES) true From db1dabca9a12b9e90c72ef6a828ee9cbdcb2f1f3 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 9 Aug 2017 23:46:57 -0700 Subject: [PATCH 12/35] Use separate folders for different cases of a theory (cherry picked from commit 4ccf1b690280e40fe8e79291603f02e454ff14f4) --- test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs b/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs index bbe3390713..ba37b1e737 100644 --- a/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs +++ b/test/dotnet-add-reference.Tests/GivenDotnetAddReference.cs @@ -661,7 +661,7 @@ public void ItCanAddRefWithoutCondAndTargetingSupersetOfFrameworksAndOneOfRefere [InlineData("nonexistingframeworkname")] public void WhenFrameworkSwitchIsNotMatchingAnyOfTargetedFrameworksItPrintsError(string framework) { - var setup = Setup(); + var setup = Setup(framework); var lib = new ProjDir(setup.LibDir); var net45lib = new ProjDir(Path.Combine(setup.TestRoot, "Net45Lib")); From dd4a1b51214086ffad2518fe2afe3082d3d5af58 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 9 Aug 2017 23:47:36 -0700 Subject: [PATCH 13/35] Show path when directory delete fails in test setup (cherry picked from commit 61e68e621ab44daf4b1ab6ca06474b60f74b95d0) --- src/Microsoft.DotNet.TestFramework/TestAssetInstance.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.TestFramework/TestAssetInstance.cs b/src/Microsoft.DotNet.TestFramework/TestAssetInstance.cs index bf75f00c2b..4d27d0fe75 100644 --- a/src/Microsoft.DotNet.TestFramework/TestAssetInstance.cs +++ b/src/Microsoft.DotNet.TestFramework/TestAssetInstance.cs @@ -51,7 +51,14 @@ public TestAssetInstance(TestAssetInfo testAssetInfo, DirectoryInfo root) if (Root.Exists) { - Root.Delete(recursive: true); + try + { + Root.Delete(recursive: true); + } + catch (IOException ex) + { + throw new InvalidOperationException("Unable to delete directory: " + Root.FullName, ex); + } } Root.Create(); From ee7852a7908f16cdd37c7e9bd5bb7efab706c743 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 10 Aug 2017 22:28:14 -0700 Subject: [PATCH 14/35] Copy empty Directory.Build.props to artifacts folder during build instead of checking it in (cherry picked from commit 884a48372d5766fccec13d2107d3554155f1aa7f) --- artifacts/Directory.Build.props | 3 --- build/Prepare.targets | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) delete mode 100644 artifacts/Directory.Build.props diff --git a/artifacts/Directory.Build.props b/artifacts/Directory.Build.props deleted file mode 100644 index 905549edcb..0000000000 --- a/artifacts/Directory.Build.props +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/build/Prepare.targets b/build/Prepare.targets index 214b1f78d2..942ade9fb6 100644 --- a/build/Prepare.targets +++ b/build/Prepare.targets @@ -4,7 +4,7 @@ + DependsOnTargets="Init;DownloadHostAndSharedFxArtifacts;RestoreSrcPackages;RestoreToolsPackages;IsolateArtifactsFromDirectoryBuildFiles" /> + + + From f39315771e4930c12be77b3817e4d7466b3e2f67 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 11 Aug 2017 07:09:01 -0700 Subject: [PATCH 15/35] Generate properties to pass to the next stage of the build (cherry picked from commit 12f8c2377f512d01e53a315e538ab945c5cbe5ba) --- Directory.Build.props | 2 +- build/OutputDirectories.props | 20 ++++++++++--- build/Prepare.targets | 30 ++++++++++++++++++- build/Stage0.props | 14 +++++++-- build/Test.targets | 9 ++++-- build/test/RunTest.proj | 1 + .../dotnet-cli-build/DotNetMSBuildTool.cs | 9 +++++- .../ArgumentForwardingTests.csproj | 3 +- 8 files changed, 75 insertions(+), 13 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 02d0b04065..48625efad4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -47,9 +47,9 @@ tools\TestAssetsDependencies\TestAssetsDependencies.csproj + - diff --git a/build/OutputDirectories.props b/build/OutputDirectories.props index 01b5e0a6fb..f175698a8f 100644 --- a/build/OutputDirectories.props +++ b/build/OutputDirectories.props @@ -1,10 +1,19 @@ - $(RepoRoot)/artifacts/$(Rid) - $(BaseOutputDirectory)/stage2 - $(BaseOutputDirectory)/stage2WithBackwardsCompatibleRuntimes + $([MSBuild]::Add($(CliOuterBuildStage), '1')) + 2 + + + $(RepoRoot)/artifacts/stage$(CliBuildStage)/$(Rid) + $([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/bin/$(MSBuildProjectName)')) + + $([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/obj/$(MSBuildProjectName)')) + $(BaseOutputDirectory)/dotnet + $(BaseOutputDirectory)/dotnetWithBackwardsCompatibleRuntimes $(OutputDirectory)/sdk/$(SdkVersion) - $(BaseOutputDirectory)/stage2symbols + $(BaseOutputDirectory)/symbols $(SdkOutputDirectory)/Roslyn $(SdkOutputDirectory)/FSharp $(BaseOutputDirectory)/stage2compilation @@ -12,6 +21,7 @@ $(BaseOutputDirectory)/packages $(IntermediateDirectory)/sharedFrameworkPublish + $(BaseOutputDirectory)/AspRT $(IntermediateDirectory)/backwardsCompatibleSharedFrameworksPublish $(BaseOutputDirectory)/testpackages/ @@ -19,5 +29,7 @@ $(IntermediateDirectory)/GeneratedMSBuildExtensions $(IntermediateDirectory)/MSBuildExtensionsLayout $(MSBuildExtensionsLayoutDirectory)/MSBuildSdkResolver + + $(BaseOutputDirectory)/PreviousStage.props diff --git a/build/Prepare.targets b/build/Prepare.targets index 942ade9fb6..8c3cc14427 100644 --- a/build/Prepare.targets +++ b/build/Prepare.targets @@ -4,7 +4,7 @@ + DependsOnTargets="Init;DownloadHostAndSharedFxArtifacts;RestoreSrcPackages;RestoreToolsPackages;IsolateArtifactsFromDirectoryBuildFiles;CreatePropsForNextStage" /> + + + + +<Project> + <PropertyGroup> + <PreviousStageDirectory>$(OutputDirectory)</PreviousStageDirectory> + <PreviousStageDotnet>$(DotnetInOutputDirectory)</PreviousStageDotnet> + <CliOuterBuildStage>$(CliBuildStage)</CliOuterBuildStage> + </PropertyGroup> +</Project> + + + + $([System.IO.File]::ReadAllText($(NextStagePropsPath))) + + + false + true + + + + + diff --git a/build/Stage0.props b/build/Stage0.props index e5a6a0b500..1432a048aa 100644 --- a/build/Stage0.props +++ b/build/Stage0.props @@ -1,8 +1,18 @@ - + $(RepoRoot)/.dotnet_stage0/$(Architecture) - $(RepoRoot)/.dotnet_stage0PJ/$(Architecture) $(Stage0Directory)/dotnet$(ExeExtension) + + + + + + $(PreviousStageDirectory) + $(PreviousStageDotnet) + + + + False True diff --git a/build/Test.targets b/build/Test.targets index c8f4a88291..2918de1f91 100644 --- a/build/Test.targets +++ b/build/Test.targets @@ -26,6 +26,7 @@ Configuration=$(Configuration); TestArtifactsDir=$(TestArtifactsDir); TestPackagesDir=$(TestPackagesDir); + PreviousStageProps=$(NextStagePropsPath); TestProject=%(TestProjects.Identity); TestResultXmlDir=$(TestResultXmlDir); ToolPath=$(OutputDirectory); @@ -54,13 +55,15 @@ DependsOnTargets="PrepareTests; CreateTestAssetPackageNuPkgs;"> + ProjectPath=""$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln"" + AdditionalParameters="/p:PreviousStageProps=$(NextStagePropsPath)" /> @@ -71,7 +74,7 @@ @@ -79,7 +82,7 @@ ProjectPath="%(TestPackageProject.ProjectPath)" ToolPath="$(OutputDirectory)" VersionSuffix="%(TestPackageProject.VersionSuffix)" - MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion) /p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages" /> + MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion) /p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages /p:PreviousStageProps=$(NextStagePropsPath)" /> diff --git a/build/test/RunTest.proj b/build/test/RunTest.proj index cff315a141..0454d8a6f6 100644 --- a/build/test/RunTest.proj +++ b/build/test/RunTest.proj @@ -14,6 +14,7 @@ + - + + From c665fd3654d013231196f7816a065420bb4dd194 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 11 Aug 2017 08:37:31 -0700 Subject: [PATCH 16/35] Update expected SDK version test to work with multiple stages (cherry picked from commit e4777c0b9173756f5c48edbbf7a3ff8144b96f41) --- test/dotnet.Tests/VersionTest.cs | 8 +------ test/dotnet.Tests/dotnet.Tests.csproj | 32 +++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/test/dotnet.Tests/VersionTest.cs b/test/dotnet.Tests/VersionTest.cs index 0192f5fd8c..3b0e1c92e6 100644 --- a/test/dotnet.Tests/VersionTest.cs +++ b/test/dotnet.Tests/VersionTest.cs @@ -17,7 +17,7 @@ public class GivenDotnetSdk : TestBase [Fact] public void VersionCommandDisplaysCorrectVersion() { - var versionFilePath = Path.Combine(AppContext.BaseDirectory, ".version"); + var versionFilePath = Path.Combine(AppContext.BaseDirectory, "ExpectedSdkVersion.txt"); var version = GetVersionFromFile(versionFilePath); CommandResult result = new DotnetCommand() @@ -31,14 +31,8 @@ private string GetVersionFromFile(string versionFilePath) { using (var reader = new StreamReader(File.OpenRead(versionFilePath))) { - SkipCommit(reader); return reader.ReadLine(); } } - - private void SkipCommit(StreamReader reader) - { - reader.ReadLine(); - } } } diff --git a/test/dotnet.Tests/dotnet.Tests.csproj b/test/dotnet.Tests/dotnet.Tests.csproj index a3863f7229..66872e2086 100644 --- a/test/dotnet.Tests/dotnet.Tests.csproj +++ b/test/dotnet.Tests/dotnet.Tests.csproj @@ -22,11 +22,35 @@ PreserveNewest PreserveNewest - - .version - PreserveNewest - + + + + + $(IntermediateOutputPath)ExpectedSdkVersion.txt + + $(SdkVersion) + + $([System.IO.File]::ReadAllText($(ExpectedVersionFileInIntermediateFolder))) + + + false + true + + + + + + + + + From ca34332205d9e6316bb67573ab2070416456887c Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 11 Aug 2017 16:13:43 -0700 Subject: [PATCH 17/35] Rename Stage0 build variables to PreviousStage (cherry picked from commit c6e4c8f477a4e5c335874eeb3059d4f3796d2559) --- Directory.Build.props | 2 +- Microsoft.DotNet.Cli.sln | 2 +- build.proj | 4 ++-- build/BundledTemplates.proj | 2 +- build/MSBuildExtensions.targets | 2 +- build/Prepare.targets | 4 ++-- build/RestoreDependency.proj | 2 +- build/{Stage0.props => SetupPreviousStage.props} | 10 ++-------- build/Test.targets | 2 +- build/package/Installer.DEB.proj | 4 ++-- build/package/Installer.MSI.targets | 2 +- build/package/Nupkg.targets | 4 ++-- build/prepare/CheckPrereqs.targets | 4 ++-- src/redist/redist.csproj | 8 ++++---- 14 files changed, 23 insertions(+), 29 deletions(-) rename build/{Stage0.props => SetupPreviousStage.props} (50%) diff --git a/Directory.Build.props b/Directory.Build.props index 48625efad4..6a533eab33 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -47,7 +47,7 @@ tools\TestAssetsDependencies\TestAssetsDependencies.csproj - + diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index 2b397c406c..3be7078be2 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -54,7 +54,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{89905EC4 build\RestoreDependency.proj = build\RestoreDependency.proj build\sdks\sdks.csproj = build\sdks\sdks.csproj build\Signing.proj = build\Signing.proj - build\Stage0.props = build\Stage0.props + build\SetupPreviousStage.props = build\SetupPreviousStage.props build\Test.targets = build\Test.targets build\Version.props = build\Version.props build\VersionBadge.props = build\VersionBadge.props diff --git a/build.proj b/build.proj index 41ab0f56a5..837cf150e2 100644 --- a/build.proj +++ b/build.proj @@ -20,7 +20,7 @@ DependsOnTargets="MSBuildWorkaroundTarget; RestoreDotnetCliBuildFramework"> - @@ -39,7 +39,7 @@ $(ExtraRestoreArgs) --disable-parallel - diff --git a/build/BundledTemplates.proj b/build/BundledTemplates.proj index 014f5bc92d..dfc66e1116 100644 --- a/build/BundledTemplates.proj +++ b/build/BundledTemplates.proj @@ -23,7 +23,7 @@ - diff --git a/build/MSBuildExtensions.targets b/build/MSBuildExtensions.targets index c6dd9f7aee..e24b2225b8 100644 --- a/build/MSBuildExtensions.targets +++ b/build/MSBuildExtensions.targets @@ -75,7 +75,7 @@ NuGetPackagesDir=$(NuGetPackagesDir); DependencyPackageName=%(ExtensionPackageToRestore.Identity); DependencyPackageVersion=%(ExtensionPackageToRestore.Version); - Stage0Directory=$(Stage0Directory) + PreviousStageDirectory=$(PreviousStageDirectory) diff --git a/build/Prepare.targets b/build/Prepare.targets index 8c3cc14427..67ae12cab9 100644 --- a/build/Prepare.targets +++ b/build/Prepare.targets @@ -54,7 +54,7 @@ - @@ -79,7 +79,7 @@ - diff --git a/build/RestoreDependency.proj b/build/RestoreDependency.proj index 142f5e9298..19f209ce02 100644 --- a/build/RestoreDependency.proj +++ b/build/RestoreDependency.proj @@ -33,7 +33,7 @@ - diff --git a/build/Stage0.props b/build/SetupPreviousStage.props similarity index 50% rename from build/Stage0.props rename to build/SetupPreviousStage.props index 1432a048aa..4798cf582e 100644 --- a/build/Stage0.props +++ b/build/SetupPreviousStage.props @@ -1,16 +1,10 @@ - $(RepoRoot)/.dotnet_stage0/$(Architecture) - $(Stage0Directory)/dotnet$(ExeExtension) + $(RepoRoot)/.dotnet_stage0/$(Architecture) + $(PreviousStageDirectory)/dotnet$(ExeExtension) - - - $(PreviousStageDirectory) - $(PreviousStageDotnet) - - False diff --git a/build/Test.targets b/build/Test.targets index 2918de1f91..18880e1e58 100644 --- a/build/Test.targets +++ b/build/Test.targets @@ -88,6 +88,6 @@ + ToolPath="$(PreviousStageDirectory)" /> diff --git a/build/package/Installer.DEB.proj b/build/package/Installer.DEB.proj index 66300c4dfa..d06be6a302 100644 --- a/build/package/Installer.DEB.proj +++ b/build/package/Installer.DEB.proj @@ -64,7 +64,7 @@ Mode="u+x" /> - - diff --git a/build/package/Installer.MSI.targets b/build/package/Installer.MSI.targets index 2a4e131b84..8721c46738 100644 --- a/build/package/Installer.MSI.targets +++ b/build/package/Installer.MSI.targets @@ -199,7 +199,7 @@ + -DotnetDir '$(PreviousStageDirectory)'" /> @@ -34,7 +34,7 @@ - diff --git a/build/prepare/CheckPrereqs.targets b/build/prepare/CheckPrereqs.targets index 1e7454410f..03d743c351 100644 --- a/build/prepare/CheckPrereqs.targets +++ b/build/prepare/CheckPrereqs.targets @@ -8,8 +8,8 @@ DependsOnTargets="CheckUbuntuAptGetDependencies; CheckCentOsYumDependencies;"> - - + + - @@ -81,7 +81,7 @@ - @@ -159,7 +159,7 @@ SdkLayoutDirectory=$(SdkOutputDirectory)/Sdks/%(BundledSdk.Identity); DependencyPackageName=%(BundledSdk.Identity); DependencyPackageVersion=%(BundledSdk.Version); - Stage0Directory=$(Stage0Directory) + PreviousStageDirectory=$(PreviousStageDirectory) @@ -178,7 +178,7 @@ TemplateLayoutDirectory=$(SdkOutputDirectory)/Templates; TemplatePackageName=%(BundledTemplate.Identity); TemplatePackageVersion=%(BundledTemplate.Version); - Stage0Directory=$(Stage0Directory) + PreviousStageDirectory=$(PreviousStageDirectory) From ca21dee79a588edc567ded46448003b2649e7a00 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 14 Aug 2017 17:42:07 -0700 Subject: [PATCH 18/35] Update MSI tests to use new output directory layout (cherry picked from commit 2222290394babb75cb92a72a14bbb5f4f11d7557) --- build/package/Installer.MSI.targets | 3 ++- test/Installer/testmsi.ps1 | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build/package/Installer.MSI.targets b/build/package/Installer.MSI.targets index 8721c46738..ea98d309a7 100644 --- a/build/package/Installer.MSI.targets +++ b/build/package/Installer.MSI.targets @@ -199,7 +199,8 @@ + -DotnetDir '$(PreviousStageDirectory)' + -TestDir '$(TestOutputDir)'" /> Date: Mon, 28 Aug 2017 12:39:12 -0700 Subject: [PATCH 19/35] Fix DotNetRestore after merging upstream changes (cherry picked from commit fc6f2f3bfa412ea0c373a24386a43001501631b8) --- build_projects/dotnet-cli-build/DotNetRestore.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/build_projects/dotnet-cli-build/DotNetRestore.cs b/build_projects/dotnet-cli-build/DotNetRestore.cs index 88bca5e225..d7d984be36 100644 --- a/build_projects/dotnet-cli-build/DotNetRestore.cs +++ b/build_projects/dotnet-cli-build/DotNetRestore.cs @@ -12,13 +12,11 @@ protected override string Command protected override string Args { - get { return $"{base.Args} {GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; } + get { return $"{base.Args} {GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {AdditionalParameters}"; } } public string ConfigFile { get; set; } - public string AdditionalParameters { get; set; } - public string ProjectPath { get; set; } public string Source { get; set; } @@ -88,10 +86,5 @@ private string GetRuntime() return null; } - - private string GetAdditionalParameters() - { - return AdditionalParameters; - } } } From 4cd03dcae4cdba00320f7dd2038c20d9ae8f6ea1 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Mon, 28 Aug 2017 16:38:55 -0700 Subject: [PATCH 20/35] Use shorter output paths to avoid max path issues on Windows For example, "out/2" instead of "artifacts/stage2" (cherry picked from commit dcb3a7ade75c360d9a1673e0c22cfe046ad50e34) --- .gitignore | 1 + build/InitRepo.props | 2 +- build/OutputDirectories.props | 2 +- build/Prepare.targets | 2 +- .../RepoDirectoriesProvider.cs | 7 +++++-- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 7bed92752c..a5216b7f74 100644 --- a/.gitignore +++ b/.gitignore @@ -96,6 +96,7 @@ dlldata.c # DNX project.lock.json artifacts/ +out/ *_i.c *_p.c diff --git a/build/InitRepo.props b/build/InitRepo.props index 3a17534a97..ff909b2c94 100644 --- a/build/InitRepo.props +++ b/build/InitRepo.props @@ -1,6 +1,6 @@ - $(RepoRoot)/artifacts/obj + $(RepoRoot)/out/obj $(GeneratedPropsDir)/GitCommitInfo.props $(GeneratedPropsDir)/HostInfo.props $(GeneratedPropsDir)/BuildInfo.props diff --git a/build/OutputDirectories.props b/build/OutputDirectories.props index f175698a8f..1a84824c39 100644 --- a/build/OutputDirectories.props +++ b/build/OutputDirectories.props @@ -6,7 +6,7 @@ - $(RepoRoot)/artifacts/stage$(CliBuildStage)/$(Rid) + $(RepoRoot)/out/$(CliBuildStage)/$(Rid) $([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/bin/$(MSBuildProjectName)')) $([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/obj/$(MSBuildProjectName)')) diff --git a/build/Prepare.targets b/build/Prepare.targets index 67ae12cab9..8858e03b3f 100644 --- a/build/Prepare.targets +++ b/build/Prepare.targets @@ -100,7 +100,7 @@ diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs index 8f5fe78ff5..6c061de37b 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs @@ -58,7 +58,7 @@ public static string BuildRid { if (string.IsNullOrEmpty(s_buildRid)) { - var buildInfoPath = Path.Combine(RepoRoot, "artifacts", "obj", "BuildInfo.props"); + var buildInfoPath = Path.Combine(RepoRoot, "out", "obj", "BuildInfo.props"); var root = XDocument.Load(buildInfoPath).Root; var ns = root.Name.Namespace; @@ -94,7 +94,10 @@ public RepoDirectoriesProvider( string corehostDummyPackages = null, string pjDotnet = null) { - _artifacts = artifacts ?? Path.Combine(RepoRoot, "artifacts", "stage2", BuildRid); + _artifacts = artifacts ?? Path.Combine(RepoRoot, + "out", + "2", // Stage - ideally this would come from the "previous stage" + BuildRid); _builtDotnet = builtDotnet ?? Path.Combine(_artifacts, "intermediate", "sharedFrameworkPublish"); _nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages"); _pjDotnet = pjDotnet ?? GetPjDotnetPath(); From 21b9a5fb6f9645aec1fbc4f7490b3ed1145e093b Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 29 Aug 2017 09:59:38 -0700 Subject: [PATCH 21/35] Fix test asset that had NuGet.Config pointing to incorrect directory (cherry picked from commit 103b8a6ec4495fbc441ec3dba08b9d8373144c6b) --- .../TestProjects/MSBuildTestApp/MSBuildTestApp.csproj | 1 + TestAssets/TestProjects/MSBuildTestApp/NuGet.Config | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 TestAssets/TestProjects/MSBuildTestApp/NuGet.Config diff --git a/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj b/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj index 79bceb82d7..7259a5723e 100644 --- a/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj +++ b/TestAssets/TestProjects/MSBuildTestApp/MSBuildTestApp.csproj @@ -5,6 +5,7 @@ Exe netcoreapp2.0 win7-x64;win7-x86;osx.10.12-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;centos.7-x64;rhel.7-x64;debian.8-x64;fedora.24-x64;opensuse.42.1-x64 + $(TEST_PACKAGES) diff --git a/TestAssets/TestProjects/MSBuildTestApp/NuGet.Config b/TestAssets/TestProjects/MSBuildTestApp/NuGet.Config deleted file mode 100644 index b8e876fcb7..0000000000 --- a/TestAssets/TestProjects/MSBuildTestApp/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - From 7b2eb66236757aa3797dfe300b3f1e739f8cd8e5 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 29 Aug 2017 11:26:28 -0700 Subject: [PATCH 22/35] Fix multiple tests using same output path (cherry picked from commit 9fb5f746ae8ebc51a8bdf11a81a2d9a1ce7f0304) --- test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs b/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs index febd7a9b36..04d28850c0 100644 --- a/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs +++ b/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs @@ -131,7 +131,7 @@ public void ItPrintsBuildSummary() { var testAppName = "MSBuildTestApp"; var testInstance = TestAssets.Get(testAppName) - .CreateInstance(testAppName) + .CreateInstance() .WithSourceFiles() .WithRestoreFiles(); From dfe1f69f97538faa5a70ac9a3f3747ee059dae3a Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 29 Aug 2017 11:27:29 -0700 Subject: [PATCH 23/35] Fix test assets with NuGet.Config files pointing to old layout (cherry picked from commit fd66cdcc2fe1da99f241e95b72257df980f72322) --- .../AppWithRedirectsAndConfig.csproj | 1 + .../AppWithRedirectsNoConfig.csproj | 1 + .../DesktopTestProjects/BindingRedirectSample/NuGet.Config | 6 ------ .../AppWithDepOnToolWithOutputName.csproj | 1 + .../AppWithDepOnToolWithOutputName/NuGet.Config | 6 ------ .../AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj | 1 + .../TestProjects/AppWithDirectAndToolDep/NuGet.Config | 6 ------ .../TestProjects/AppWithDirectDep/AppWithDirectDep.csproj | 1 + TestAssets/TestProjects/AppWithDirectDep/NuGet.Config | 6 ------ .../MSBuildAppWithMultipleFrameworksAndTools.csproj | 1 + .../TestProjects/AppWithMultipleFxAndTools/NuGet.Config | 6 ------ .../AppWithToolDependency/AppWithToolDependency.csproj | 1 + TestAssets/TestProjects/AppWithToolDependency/NuGet.Config | 6 ------ TestAssets/TestProjects/NuGet.Config | 6 ------ TestAssets/TestProjects/global.json | 3 --- 15 files changed, 7 insertions(+), 45 deletions(-) delete mode 100644 TestAssets/DesktopTestProjects/BindingRedirectSample/NuGet.Config delete mode 100644 TestAssets/TestProjects/AppWithDepOnToolWithOutputName/NuGet.Config delete mode 100644 TestAssets/TestProjects/AppWithDirectAndToolDep/NuGet.Config delete mode 100644 TestAssets/TestProjects/AppWithDirectDep/NuGet.Config delete mode 100644 TestAssets/TestProjects/AppWithMultipleFxAndTools/NuGet.Config delete mode 100644 TestAssets/TestProjects/AppWithToolDependency/NuGet.Config delete mode 100644 TestAssets/TestProjects/NuGet.Config delete mode 100644 TestAssets/TestProjects/global.json diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj index 82a5ad25df..287b089bb5 100644 --- a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj +++ b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsAndConfig/AppWithRedirectsAndConfig.csproj @@ -4,6 +4,7 @@ AppWithRedirectsAndConfig Exe win7-x64;win7-x86 + $(TEST_PACKAGES) diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj index 94b99d56b3..8e5fc172ef 100644 --- a/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj +++ b/TestAssets/DesktopTestProjects/BindingRedirectSample/AppWithRedirectsNoConfig/AppWithRedirectsNoConfig.csproj @@ -4,6 +4,7 @@ AppWithRedirectsNoConfig Exe win7-x64;win7-x86 + $(TEST_PACKAGES) diff --git a/TestAssets/DesktopTestProjects/BindingRedirectSample/NuGet.Config b/TestAssets/DesktopTestProjects/BindingRedirectSample/NuGet.Config deleted file mode 100644 index b8e876fcb7..0000000000 --- a/TestAssets/DesktopTestProjects/BindingRedirectSample/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj b/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj index 9adf4c6fc3..0559ffd92f 100755 --- a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj +++ b/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/AppWithDepOnToolWithOutputName.csproj @@ -4,6 +4,7 @@ netcoreapp2.0 Exe + $(TEST_PACKAGES) diff --git a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/NuGet.Config b/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/NuGet.Config deleted file mode 100644 index b8e876fcb7..0000000000 --- a/TestAssets/TestProjects/AppWithDepOnToolWithOutputName/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj b/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj index df284421b9..d942962380 100755 --- a/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj +++ b/TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj @@ -4,6 +4,7 @@ netcoreapp2.0 Exe + $(TEST_PACKAGES) diff --git a/TestAssets/TestProjects/AppWithDirectAndToolDep/NuGet.Config b/TestAssets/TestProjects/AppWithDirectAndToolDep/NuGet.Config deleted file mode 100644 index dd7ccd7af1..0000000000 --- a/TestAssets/TestProjects/AppWithDirectAndToolDep/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj b/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj index 6995199ee6..f8fea864cd 100755 --- a/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj +++ b/TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj @@ -7,6 +7,7 @@ AppWithDirectDep Exe false + $(TEST_PACKAGES) diff --git a/TestAssets/TestProjects/AppWithDirectDep/NuGet.Config b/TestAssets/TestProjects/AppWithDirectDep/NuGet.Config deleted file mode 100644 index dd7ccd7af1..0000000000 --- a/TestAssets/TestProjects/AppWithDirectDep/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj b/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj index 33cb2b5a75..3f38586d57 100644 --- a/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj +++ b/TestAssets/TestProjects/AppWithMultipleFxAndTools/MSBuildAppWithMultipleFrameworksAndTools.csproj @@ -4,6 +4,7 @@ Exe net451;netcoreapp2.0 + $(TEST_PACKAGES) diff --git a/TestAssets/TestProjects/AppWithMultipleFxAndTools/NuGet.Config b/TestAssets/TestProjects/AppWithMultipleFxAndTools/NuGet.Config deleted file mode 100644 index b8e876fcb7..0000000000 --- a/TestAssets/TestProjects/AppWithMultipleFxAndTools/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj b/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj index 7f9c168488..6f493b0c3b 100755 --- a/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj +++ b/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj @@ -4,6 +4,7 @@ netcoreapp2.0 Exe + $(TEST_PACKAGES) diff --git a/TestAssets/TestProjects/AppWithToolDependency/NuGet.Config b/TestAssets/TestProjects/AppWithToolDependency/NuGet.Config deleted file mode 100644 index b8e876fcb7..0000000000 --- a/TestAssets/TestProjects/AppWithToolDependency/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/TestProjects/NuGet.Config b/TestAssets/TestProjects/NuGet.Config deleted file mode 100644 index b03d4d16cc..0000000000 --- a/TestAssets/TestProjects/NuGet.Config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/TestAssets/TestProjects/global.json b/TestAssets/TestProjects/global.json deleted file mode 100644 index 09f20328d7..0000000000 --- a/TestAssets/TestProjects/global.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "projects": [ ".", "../../src" ] -} \ No newline at end of file From 9f3bbc40a280413535225d9780d37dfb94102653 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 29 Aug 2017 17:59:34 -0700 Subject: [PATCH 24/35] Use a shorter path for test working directories, get rid of Stage 0 project.json based CLI (cherry picked from commit 4c3b13e4a8e8c3f074c0b385ae1b9938a454b5b5) --- run-build.ps1 | 20 -- run-build.sh | 13 -- .../TestAssetInfo.cs | 28 +-- .../TestAssets.cs | 45 +---- .../Commands/BuildPJCommand.cs | 183 ------------------ .../Commands/RestoreProjectJsonCommand.cs | 28 --- .../RepoDirectoriesProvider.cs | 26 +-- .../TestBase.cs | 2 +- 8 files changed, 32 insertions(+), 313 deletions(-) delete mode 100644 test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/BuildPJCommand.cs delete mode 100644 test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/RestoreProjectJsonCommand.cs diff --git a/run-build.ps1 b/run-build.ps1 index d3bb1152b1..6acbb15ce5 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -53,18 +53,6 @@ if (!(Test-Path $env:DOTNET_INSTALL_DIR)) mkdir $env:DOTNET_INSTALL_DIR | Out-Null } -# We also need to pull down a project.json based CLI that is used by some tests -# so create another directory for that. -if (!$env:DOTNET_INSTALL_DIR_PJ) -{ - $env:DOTNET_INSTALL_DIR_PJ="$RepoRoot\.dotnet_stage0PJ\$Architecture" -} - -if (!(Test-Path $env:DOTNET_INSTALL_DIR_PJ)) -{ - mkdir $env:DOTNET_INSTALL_DIR_PJ | Out-Null -} - # Disable first run since we want to control all package sources @@ -88,14 +76,6 @@ if ($LastExitCode -ne 0) exit $LastExitCode } -Write-Output "$dotnetInstallPath -Channel ""master"" -InstallDir $env:DOTNET_INSTALL_DIR_PJ -Architecture ""$Architecture"" -Version 1.0.0-preview2-1-003177" -Invoke-Expression "$dotnetInstallPath -Channel ""master"" -InstallDir $env:DOTNET_INSTALL_DIR_PJ -Architecture ""$Architecture"" -Version 1.0.0-preview2-1-003177" -if ($LastExitCode -ne 0) -{ - Write-Output "The .NET CLI installation failed with exit code $LastExitCode" - exit $LastExitCode -} - # Put the stage0 on the path $env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH" diff --git a/run-build.sh b/run-build.sh index 95154cdf6c..0dce787e9c 100755 --- a/run-build.sh +++ b/run-build.sh @@ -139,11 +139,6 @@ args=($temp) [ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$ARCHITECTURE [ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR -# We also need to pull down a project.json based CLI that is used by some tests -# so create another directory for that. -[ -z "$DOTNET_INSTALL_DIR_PJ" ] && export DOTNET_INSTALL_DIR_PJ=$REPOROOT/.dotnet_stage0PJ/$ARCHITECTURE -[ -d "$DOTNET_INSTALL_DIR_PJ" ] || mkdir -p $DOTNET_INSTALL_DIR_PJ - export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 # Enable verbose VS Test Console logging @@ -163,14 +158,6 @@ if [ $EXIT_CODE != 0 ]; then exit $EXIT_CODE fi -# Install a project.json based CLI for use by tests -(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "master" --install-dir "$DOTNET_INSTALL_DIR_PJ" --architecture "$ARCHITECTURE" --version "1.0.0-preview2-1-003177") -EXIT_CODE=$? -if [ $EXIT_CODE != 0 ]; then - echo "run-build: Error: installing project-json based cli failed with exit code $EXIT_CODE." >&2 - exit $EXIT_CODE -fi - # Put stage 0 on the PATH (for this shell only) PATH="$DOTNET_INSTALL_DIR:$PATH" diff --git a/src/Microsoft.DotNet.TestFramework/TestAssetInfo.cs b/src/Microsoft.DotNet.TestFramework/TestAssetInfo.cs index f5ca0aebe5..bec0b57290 100644 --- a/src/Microsoft.DotNet.TestFramework/TestAssetInfo.cs +++ b/src/Microsoft.DotNet.TestFramework/TestAssetInfo.cs @@ -15,13 +15,15 @@ public class TestAssetInfo public string AssetName { get; private set; } - public FileInfo DotnetExeFile { get; private set; } + public FileInfo DotnetExeFile => _testAssets.DotnetCsprojExe; - public string ProjectFilePattern { get; private set; } + public string ProjectFilePattern => "*.csproj"; public DirectoryInfo Root { get; private set; } - internal TestAssetInfo(DirectoryInfo root, string assetName, FileInfo dotnetExeFile, string projectFilePattern) + private TestAssets _testAssets { get; } + + internal TestAssetInfo(DirectoryInfo root, string assetName, TestAssets testAssets) { if (root == null) { @@ -33,23 +35,16 @@ internal TestAssetInfo(DirectoryInfo root, string assetName, FileInfo dotnetExeF throw new ArgumentException("Argument cannot be null or whitespace", nameof(assetName)); } - if (dotnetExeFile == null) + if (testAssets == null) { - throw new ArgumentNullException(nameof(dotnetExeFile)); - } - - if (string.IsNullOrWhiteSpace(projectFilePattern)) - { - throw new ArgumentException("Argument cannot be null or whitespace", nameof(projectFilePattern)); + throw new ArgumentNullException(nameof(testAssets)); } Root = root; AssetName = assetName; - DotnetExeFile = dotnetExeFile; - - ProjectFilePattern = projectFilePattern; + _testAssets = testAssets; } public TestAssetInstance CreateInstance([CallerMemberName] string callingMethod = "", string identifier = "") @@ -71,12 +66,7 @@ internal IEnumerable GetSourceFiles() private DirectoryInfo GetTestDestinationDirectory(string callingMethod, string identifier) { -#if NET451 - string baseDirectory = AppDomain.CurrentDomain.BaseDirectory; -#else - string baseDirectory = AppContext.BaseDirectory; -#endif - return new DirectoryInfo(Path.Combine(baseDirectory, callingMethod + identifier, AssetName)); + return _testAssets.CreateTestDirectory(AssetName, callingMethod, identifier); } private void ThrowIfTestAssetDoesNotExist() diff --git a/src/Microsoft.DotNet.TestFramework/TestAssets.cs b/src/Microsoft.DotNet.TestFramework/TestAssets.cs index 0e47e3ba92..6d05788fdf 100644 --- a/src/Microsoft.DotNet.TestFramework/TestAssets.cs +++ b/src/Microsoft.DotNet.TestFramework/TestAssets.cs @@ -17,13 +17,11 @@ public class TestAssets private FileInfo _dotnetCsprojExe; - private FileInfo _dotnetProjectJsonExe; + private string _testWorkingFolder; - private const string ProjectJsonSearchPattern = "project.json"; + public FileInfo DotnetCsprojExe => _dotnetCsprojExe; - private const string CsprojSearchPattern = "*.csproj"; - - public TestAssets(DirectoryInfo assetsRoot, FileInfo dotnetCsprojExe, FileInfo dotnetProjectJsonExe) + public TestAssets(DirectoryInfo assetsRoot, FileInfo dotnetCsprojExe, string testWorkingFolder) { if (assetsRoot == null) { @@ -35,11 +33,6 @@ public TestAssets(DirectoryInfo assetsRoot, FileInfo dotnetCsprojExe, FileInfo d throw new ArgumentNullException(nameof(dotnetCsprojExe)); } - if (dotnetProjectJsonExe == null) - { - throw new ArgumentNullException(nameof(dotnetProjectJsonExe)); - } - if (!assetsRoot.Exists) { throw new DirectoryNotFoundException($"Directory not found at '{assetsRoot}'"); @@ -50,16 +43,10 @@ public TestAssets(DirectoryInfo assetsRoot, FileInfo dotnetCsprojExe, FileInfo d throw new FileNotFoundException("Csproj dotnet executable must exist", dotnetCsprojExe.FullName); } - if (!dotnetProjectJsonExe.Exists) - { - throw new FileNotFoundException("project.json dotnet executable must exist", dotnetProjectJsonExe.FullName); - } - _root = assetsRoot; _dotnetCsprojExe = dotnetCsprojExe; - - _dotnetProjectJsonExe = dotnetProjectJsonExe; + _testWorkingFolder = testWorkingFolder; } public TestAssetInfo Get(string name) @@ -74,24 +61,7 @@ public TestAssetInfo Get(string kind, string name) return new TestAssetInfo( assetDirectory, name, - _dotnetCsprojExe, - CsprojSearchPattern); - } - - public TestAssetInfo GetProjectJson(string name) - { - return GetProjectJson(TestAssetKinds.TestProjects, name); - } - - public TestAssetInfo GetProjectJson(string kind, string name) - { - var assetDirectory = new DirectoryInfo(Path.Combine(_root.FullName, kind, name)); - - return new TestAssetInfo( - assetDirectory, - name, - _dotnetProjectJsonExe, - ProjectJsonSearchPattern); + this); } public DirectoryInfo CreateTestDirectory(string testProjectName = "temp", [CallerMemberName] string callingMethod = "", string identifier = "") @@ -112,7 +82,10 @@ private string GetTestDestinationDirectoryPath(string testProjectName, string ca #else string baseDirectory = AppContext.BaseDirectory; #endif - return Path.Combine(baseDirectory, callingMethod + identifier, testProjectName); + // Find the name of the assembly the test comes from based on the the base directory and how the output path has been constructed + string testAssemblyName = new DirectoryInfo(baseDirectory).Parent.Parent.Name; + + return Path.Combine(_testWorkingFolder, testAssemblyName, callingMethod + identifier, testProjectName); } } } diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/BuildPJCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/BuildPJCommand.cs deleted file mode 100644 index 6b05edfe87..0000000000 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/BuildPJCommand.cs +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System.IO; -using Microsoft.DotNet.Cli.Utils; -using NuGet.Frameworks; - -namespace Microsoft.DotNet.Tools.Test.Utilities -{ - public sealed class BuildPJCommand : TestCommand - { - - private bool _captureOutput; - - private string _configuration; - - private NuGetFramework _framework; - - private string _runtime; - - private bool _noDependencies; - - private DirectoryInfo _outputPath; - - private FileInfo _projectFile; - - private DirectoryInfo _workingDirectory; - - public BuildPJCommand() - : base(new RepoDirectoriesProvider().PjDotnet) - { - } - - public override CommandResult Execute(string args = "") - { - args = $"build {GetNoDependencies()} {GetProjectFile()} {GetOutputPath()} {GetConfiguration()} {GetFramework()} {GetRuntime()} {args}"; - - if (_workingDirectory != null) - { - this.WithWorkingDirectory(_workingDirectory.FullName); - } - - if (_captureOutput) - { - return base.ExecuteWithCapturedOutput(args); - } - else - { - return base.Execute(args); - } - } - - public override CommandResult ExecuteWithCapturedOutput(string args = "") - { - WithCapturedOutput(); - - return Execute(args); - } - - public BuildPJCommand WithCapturedOutput() - { - _captureOutput = true; - - return this; - } - - public BuildPJCommand WithConfiguration(string configuration) - { - _configuration = configuration; - - return this; - } - - public BuildPJCommand WithFramework(NuGetFramework framework) - { - _framework = framework; - - return this; - } - - public BuildPJCommand WithRuntime(string runtime) - { - _runtime = runtime; - - return this; - } - - public BuildPJCommand WithNoDependencies() - { - _noDependencies = true; - - return this; - } - - public BuildPJCommand WithOutputPath(DirectoryInfo outputPath) - { - _outputPath = outputPath; - - return this; - } - - public BuildPJCommand WithProjectDirectory(DirectoryInfo projectDirectory) - { - _workingDirectory = projectDirectory; - - return this; - } - - public BuildPJCommand WithProjectFile(FileInfo projectFile) - { - _projectFile = projectFile; - - return this; - } - - public BuildPJCommand WithWorkingDirectory(DirectoryInfo workingDirectory) - { - _workingDirectory = workingDirectory; - - return this; - } - - private string GetConfiguration() - { - if (_configuration == null) - { - return null; - } - - return $"--configuration {_configuration}"; - } - - private string GetFramework() - { - if (_framework == null) - { - return null; - } - - return $"--framework {_framework.GetShortFolderName()}"; - } - - private string GetRuntime() - { - if (_runtime == null) - { - return null; - } - - return $"--runtime {_runtime}"; - } - - private string GetNoDependencies() - { - if (!_noDependencies) - { - return null; - } - - return "--no-dependencies"; - } - - private string GetOutputPath() - { - if (_outputPath == null) - { - return null; - } - - return $"\"{_outputPath.FullName}\""; - } - - private string GetProjectFile() - { - if (_projectFile == null) - { - return null; - } - - return $"\"{_projectFile.FullName}\""; - } - } -} diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/RestoreProjectJsonCommand.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/RestoreProjectJsonCommand.cs deleted file mode 100644 index a54d896057..0000000000 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Commands/RestoreProjectJsonCommand.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Microsoft.DotNet.Cli.Utils; - -namespace Microsoft.DotNet.Tools.Test.Utilities -{ - public sealed class RestoreProjectJsonCommand : TestCommand - { - public RestoreProjectJsonCommand() - : base(new RepoDirectoriesProvider().PjDotnet) - { - } - - public override CommandResult Execute(string args="") - { - args = $"restore {args}"; - - return base.Execute(args); - } - - public override CommandResult ExecuteWithCapturedOutput(string args = "") - { - args = $"restore {args}"; - return base.ExecuteWithCapturedOutput(args); - } - } -} diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs index 6c061de37b..7279949393 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs @@ -20,7 +20,7 @@ public class RepoDirectoriesProvider private string _stage2Sdk; private string _stage2WithBackwardsCompatibleRuntimesDirectory; private string _testPackages; - private string _pjDotnet; + private string _testWorkingFolder; public static string RepoRoot { @@ -81,26 +81,27 @@ public static string BuildRid public string Artifacts => _artifacts; public string BuiltDotnet => _builtDotnet; public string NugetPackages => _nugetPackages; - public string PjDotnet => _pjDotnet; public string Stage2Sdk => _stage2Sdk; public string Stage2WithBackwardsCompatibleRuntimesDirectory => _stage2WithBackwardsCompatibleRuntimesDirectory; public string TestPackages => _testPackages; + public string TestWorkingFolder => _testWorkingFolder; public RepoDirectoriesProvider( string artifacts = null, string builtDotnet = null, string nugetPackages = null, string corehostPackages = null, - string corehostDummyPackages = null, - string pjDotnet = null) + string corehostDummyPackages = null) { + // Ideally this wouldn't be hardcoded, so that you could use stage n to build stage n + 1, and then use stage n + 1 to run tests + int previousStage = 2; + _artifacts = artifacts ?? Path.Combine(RepoRoot, "out", - "2", // Stage - ideally this would come from the "previous stage" + previousStage.ToString(), BuildRid); _builtDotnet = builtDotnet ?? Path.Combine(_artifacts, "intermediate", "sharedFrameworkPublish"); _nugetPackages = nugetPackages ?? Path.Combine(RepoRoot, ".nuget", "packages"); - _pjDotnet = pjDotnet ?? GetPjDotnetPath(); _stage2Sdk = Directory .EnumerateDirectories(Path.Combine(_artifacts, "dotnet", "sdk")) .First(d => !d.Contains("NuGetFallbackFolder")); @@ -113,14 +114,13 @@ public RepoDirectoriesProvider( { throw new InvalidOperationException("TEST_PACKAGES environment variable not set"); } - } - private string GetPjDotnetPath() - { - return new DirectoryInfo(Path.Combine(RepoRoot, ".dotnet_stage0PJ")) - .GetDirectories().First() - .GetFiles("dotnet*").First() - .FullName; + _testWorkingFolder = Path.Combine(RepoRoot, + "out", + (previousStage + 1).ToString(), + BuildRid, + "test"); + } } } diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs index b377b4331a..6c2c433461 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/TestBase.cs @@ -53,7 +53,7 @@ protected static TestAssets TestAssets s_testAssets = new TestAssets( new DirectoryInfo(assetsRoot), new FileInfo(new Muxer().MuxerPath), - new FileInfo(new RepoDirectoriesProvider().PjDotnet)); + new RepoDirectoriesProvider().TestWorkingFolder); } return s_testAssets; From e60fe424322e18c3b38b0cb736f7e6d4d04cf319 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 1 Sep 2017 12:12:10 -0700 Subject: [PATCH 25/35] Fix debian package generation Previously, dotnet-deb-tool-consumer.csproj was copied to the out/artifacts folder before being restored. This no longer works as it depends on repo properties, and there is a Directory.Build.props in teh out directory to stop projects inside it from getting the repo properties. So this change restores it in-place instead. (cherry picked from commit ac67434ea4654cea2c7a9856e460d37d6acd0bbb) --- build/package/Installer.DEB.proj | 12 +----------- build/package/Installer.DEB.targets | 3 +-- .../dotnet-deb-tool-consumer.csproj | 0 3 files changed, 2 insertions(+), 13 deletions(-) rename build/package/{ => dotnet-deb-tool-consumer}/dotnet-deb-tool-consumer.csproj (100%) diff --git a/build/package/Installer.DEB.proj b/build/package/Installer.DEB.proj index d06be6a302..4b684d1617 100644 --- a/build/package/Installer.DEB.proj +++ b/build/package/Installer.DEB.proj @@ -156,22 +156,12 @@ - + - - - - - - diff --git a/build/package/Installer.DEB.targets b/build/package/Installer.DEB.targets index b041bc344c..b124ad1546 100644 --- a/build/package/Installer.DEB.targets +++ b/build/package/Installer.DEB.targets @@ -8,8 +8,7 @@ - dotnet-deb-tool-consumer.csproj - $(IntermediateDirectory)/$(DotnetDebToolConsumerProjectName) + $(MSBuildThisFileDirectory)/dotnet-deb-tool-consumer $(NuGetPackagesDir)/dotnet-deb-tool/$(DotnetDebToolVersion)/lib/netcoreapp2.0/tool/package_tool diff --git a/build/package/dotnet-deb-tool-consumer.csproj b/build/package/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj similarity index 100% rename from build/package/dotnet-deb-tool-consumer.csproj rename to build/package/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj From 02a07e6d8e23a1a426e850a97ac0da1033546ece Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 1 Sep 2017 13:50:01 -0700 Subject: [PATCH 26/35] Delete outdated comment (cherry picked from commit 546eff28c2ce6b1d25f69ae9d04123e25ec335de) --- build/OutputDirectories.props | 1 - 1 file changed, 1 deletion(-) diff --git a/build/OutputDirectories.props b/build/OutputDirectories.props index 1a84824c39..137778c413 100644 --- a/build/OutputDirectories.props +++ b/build/OutputDirectories.props @@ -21,7 +21,6 @@ $(BaseOutputDirectory)/packages $(IntermediateDirectory)/sharedFrameworkPublish - $(BaseOutputDirectory)/AspRT $(IntermediateDirectory)/backwardsCompatibleSharedFrameworksPublish $(BaseOutputDirectory)/testpackages/ From 78eb0a77197e7dbbe6e7c11874f3711972e894ab Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 1 Sep 2017 13:53:17 -0700 Subject: [PATCH 27/35] Fix test that depended on old output directory layout (cherry picked from commit 27dc8032dd8a725b85a486e8608f55d07a7a21e7) --- .../AspNetNuGetConfiguration.cs | 17 +++++++++++++++++ .../GivenThatIWantANewAppWithSpecifiedType.cs | 7 +------ 2 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 test/dotnet-new.Tests/AspNetNuGetConfiguration.cs diff --git a/test/dotnet-new.Tests/AspNetNuGetConfiguration.cs b/test/dotnet-new.Tests/AspNetNuGetConfiguration.cs new file mode 100644 index 0000000000..b49c81009f --- /dev/null +++ b/test/dotnet-new.Tests/AspNetNuGetConfiguration.cs @@ -0,0 +1,17 @@ +using System.IO; + +namespace Microsoft.DotNet.New.Tests +{ + public class AspNetNuGetConfiguration + { + public static void WriteNuGetConfigWithAspNetPrivateFeeds(string path) + { + string resourceName = "dotnet-new.Tests.NuGet.tempaspnetpatch.config"; + using (Stream input = typeof(GivenThatIWantANewAppWithSpecifiedType).Assembly.GetManifestResourceStream(resourceName)) + using (Stream output = File.OpenWrite(path)) + { + input.CopyTo(output); + } + } + } +} \ No newline at end of file diff --git a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs index b387814e9d..8c4d05abed 100644 --- a/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs +++ b/test/dotnet-new.Tests/GivenThatIWantANewAppWithSpecifiedType.cs @@ -50,12 +50,7 @@ public void TemplateRestoresAndBuildsWithoutWarnings( if (useNuGetConfigForAspNet) { - string resourceName = "dotnet-new.Tests.NuGet.tempaspnetpatch.config"; - using (Stream input = typeof(GivenThatIWantANewAppWithSpecifiedType).Assembly.GetManifestResourceStream(resourceName)) - using (Stream output = File.OpenWrite(Path.Combine(rootPath, "NuGet.Config"))) - { - input.CopyTo(output); - } + AspNetNuGetConfiguration.WriteNuGetConfigWithAspNetPrivateFeeds(Path.Combine(rootPath, "NuGet.Config")); } if (skipSpaWebpackSteps) From 65b0df5b4350a2715c18b32b2bfb42be0e130afb Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 1 Sep 2017 14:04:52 -0700 Subject: [PATCH 28/35] Rename output folder from out to bin (cherry picked from commit 97b7553e31261dc87d82109566ae9afc66d0c7de) --- .gitignore | 2 +- build/InitRepo.props | 2 +- build/OutputDirectories.props | 2 +- build/Prepare.targets | 2 +- .../RepoDirectoriesProvider.cs | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index a5216b7f74..a9597138ba 100644 --- a/.gitignore +++ b/.gitignore @@ -96,7 +96,7 @@ dlldata.c # DNX project.lock.json artifacts/ -out/ +bin/ *_i.c *_p.c diff --git a/build/InitRepo.props b/build/InitRepo.props index ff909b2c94..f917b88c2a 100644 --- a/build/InitRepo.props +++ b/build/InitRepo.props @@ -1,6 +1,6 @@ - $(RepoRoot)/out/obj + $(RepoRoot)/bin/obj $(GeneratedPropsDir)/GitCommitInfo.props $(GeneratedPropsDir)/HostInfo.props $(GeneratedPropsDir)/BuildInfo.props diff --git a/build/OutputDirectories.props b/build/OutputDirectories.props index 137778c413..52e0722212 100644 --- a/build/OutputDirectories.props +++ b/build/OutputDirectories.props @@ -6,7 +6,7 @@ - $(RepoRoot)/out/$(CliBuildStage)/$(Rid) + $(RepoRoot)/bin/$(CliBuildStage)/$(Rid) $([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/bin/$(MSBuildProjectName)')) $([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/obj/$(MSBuildProjectName)')) diff --git a/build/Prepare.targets b/build/Prepare.targets index 8858e03b3f..3b373ecfc3 100644 --- a/build/Prepare.targets +++ b/build/Prepare.targets @@ -100,7 +100,7 @@ diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs index 7279949393..bf1cc20506 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/RepoDirectoriesProvider.cs @@ -58,7 +58,7 @@ public static string BuildRid { if (string.IsNullOrEmpty(s_buildRid)) { - var buildInfoPath = Path.Combine(RepoRoot, "out", "obj", "BuildInfo.props"); + var buildInfoPath = Path.Combine(RepoRoot, "bin", "obj", "BuildInfo.props"); var root = XDocument.Load(buildInfoPath).Root; var ns = root.Name.Namespace; @@ -97,7 +97,7 @@ public RepoDirectoriesProvider( int previousStage = 2; _artifacts = artifacts ?? Path.Combine(RepoRoot, - "out", + "bin", previousStage.ToString(), BuildRid); _builtDotnet = builtDotnet ?? Path.Combine(_artifacts, "intermediate", "sharedFrameworkPublish"); @@ -116,7 +116,7 @@ public RepoDirectoriesProvider( } _testWorkingFolder = Path.Combine(RepoRoot, - "out", + "bin", (previousStage + 1).ToString(), BuildRid, "test"); From 43febd4e9dab920b6c989fe65bedc03a27d31943 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 1 Sep 2017 16:43:40 -0700 Subject: [PATCH 29/35] Remove duplicate import (cherry picked from commit 88319a71f3f56fdcedc0919351f190e525e7ecaa) --- build/sdks/sdks.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/build/sdks/sdks.csproj b/build/sdks/sdks.csproj index da276047e6..f246e1f9d5 100755 --- a/build/sdks/sdks.csproj +++ b/build/sdks/sdks.csproj @@ -1,6 +1,5 @@  - Library From e2bd3e3f386b221efaaa8cd91b49b767a9be0a20 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 1 Sep 2017 17:17:33 -0700 Subject: [PATCH 30/35] Update signing.proj to use new output paths, and import common repo props (cherry picked from commit 728cea22f133976098f10bd4dee9b173f298b5b1) --- build/MicroBuild.props | 3 --- build/Signing.proj | 24 ++---------------------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/build/MicroBuild.props b/build/MicroBuild.props index 1cf77f45b5..f55a5eea18 100644 --- a/build/MicroBuild.props +++ b/build/MicroBuild.props @@ -1,9 +1,6 @@ - - $(MSBuildThisFileDirectory)/.. - $(NUGET_PACKAGES) $(RepoRoot)/.nuget/packages $(NuGetPackagesDir)/microbuild.core/$(MicroBuildVersion)/build/ diff --git a/build/Signing.proj b/build/Signing.proj index d3eebb1402..c403c324c3 100644 --- a/build/Signing.proj +++ b/build/Signing.proj @@ -1,9 +1,8 @@ + - - @@ -13,10 +12,6 @@ - $(RepoRoot)/artifacts/$(Rid) - $(BaseOutputDirectory)/stage2 - $(BaseOutputDirectory)/stage2compilation - $(BaseOutputDirectory)/packages $(BaseOutputDirectory)/intermediate/MSBuildExtensionsLayout/MSBuildSdkResolver - + $(InternalCertificateId) @@ -85,9 +77,6 @@ - - $(SdkResolverOutputDirectory) - $(InternalCertificateId) @@ -98,9 +87,6 @@ - - $(PackagesDirectory) - $(InternalCertificateId) @@ -114,9 +100,6 @@ - - $(PackagesDirectory) - $(InternalCertificateId) @@ -127,9 +110,6 @@ - - $(PackagesDirectory) - $(InternalCertificateId) From 41695eacb1e690d830d0f977296df7a79a229d08 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Fri, 1 Sep 2017 18:21:25 -0700 Subject: [PATCH 31/35] Update environment variables for EndToEnd test run on Debian package (cherry picked from commit 6e0646f7bfba739a4ef3d8bacebcbd545a324a32) --- build/package/Installer.DEB.targets | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/package/Installer.DEB.targets b/build/package/Installer.DEB.targets index b124ad1546..62421c8950 100644 --- a/build/package/Installer.DEB.targets +++ b/build/package/Installer.DEB.targets @@ -113,6 +113,9 @@ + + + From e83ae613d6185ec007c12d11dae227af6383cde1 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Wed, 27 Sep 2017 16:52:11 -0700 Subject: [PATCH 32/35] Fix build errors and warnings after porting fixes to 2.0.x --- build_projects/dotnet-cli-build/dotnet-cli-build.csproj | 2 ++ .../Microsoft.DotNet.Cli.Utils.csproj | 1 + 2 files changed, 3 insertions(+) diff --git a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj index dd5e0c8e45..2b6c115d8b 100644 --- a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj +++ b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj @@ -23,6 +23,8 @@ + + diff --git a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj index 600794faf9..a1dd1e22f2 100644 --- a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj +++ b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj @@ -35,5 +35,6 @@ + From 7b3c1bbb23c396e617eec77006a00d8fc3d010c9 Mon Sep 17 00:00:00 2001 From: John Beisner Date: Tue, 5 Sep 2017 14:44:25 -0700 Subject: [PATCH 33/35] Adding consistent "Project" headers to inported props and target files. (cherry picked from commit 74ad01b576f04bc8dd17ce5876a865ee44f73800) --- Directory.Build.props | 2 +- build/AzureInfo.props | 2 +- build/BackwardsCompatibilityRuntimes.props | 2 +- build/BranchInfo.props | 2 +- build/Branding.props | 2 +- build/BuildDefaults.props | 2 +- build/BuildInfo.targets | 2 +- build/BundledRuntimes.props | 2 +- build/BundledSdks.props | 2 +- build/BundledTemplates.props | 2 +- build/BundledTools.props | 2 +- build/CrossGen.props | 2 +- build/DependencyVersions.props | 2 +- build/DerivedHostMachineInfo.props | 2 +- build/FileExtensions.props | 2 +- build/GenerateResxSource.targets | 2 +- build/GitCommitInfo.targets | 2 +- build/HostInfo.targets | 2 +- build/InputDirectories.props | 2 +- build/InstallerInfo.props | 2 +- build/MSBuildExtensions.props | 2 +- build/OutputDirectories.props | 2 +- build/SetupPreviousStage.props | 2 +- build/Version.props | 2 +- build/VersionBadge.props | 2 +- dir.props | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 6a533eab33..990034d5f6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,4 +1,4 @@ - + From faca86fe6267e5f5b3e4234da6ed722e0f302ca8 Mon Sep 17 00:00:00 2001 From: John Beisner Date: Tue, 5 Sep 2017 15:08:42 -0700 Subject: [PATCH 34/35] Adding required environmental variables. (cherry picked from commit 5000ba5f102ee0f750575f3cc7a022986e88881a) --- build/package/Installer.RPM.targets | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/package/Installer.RPM.targets b/build/package/Installer.RPM.targets index 1781d689b5..bd5d468f49 100644 --- a/build/package/Installer.RPM.targets +++ b/build/package/Installer.RPM.targets @@ -140,6 +140,11 @@ + + + + + From 0586375cf82fd50de99e268e5685b1f72d3b8989 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 5 Sep 2017 15:10:15 -0700 Subject: [PATCH 35/35] Avoid importing incompatible .props files for signing build (cherry picked from commit c2ca5121890d417db343abf568a1f5d99cae6444) --- Directory.Build.props | 31 +++++++++++++++++++------------ build/Signing.proj | 7 +++++++ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 990034d5f6..f0719c9ce4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -36,9 +36,6 @@ tools\TestAssetsDependencies\TestAssetsDependencies.csproj - - - @@ -49,13 +46,23 @@ tools\TestAssetsDependencies\TestAssetsDependencies.csproj - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/build/Signing.proj b/build/Signing.proj index c403c324c3..da686886ad 100644 --- a/build/Signing.proj +++ b/build/Signing.proj @@ -1,5 +1,12 @@ + + + + true + +