From 0d233cd9d0cfc1a4d903a963045ce21483e0ab4c Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 26 Sep 2017 18:13:03 -0700 Subject: [PATCH 01/40] Insert SDK 2.0.2-vspre-20170927-1 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 0b028d79e..4f43825c2 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -12,7 +12,7 @@ - 2.0.2-vspre-20170921-5 + 2.0.2-vspre-20170927-1 $(CLI_NETSDK_Version) 4.4.0-preview3-4475 From 79077b5ea214e1bfe154dc96e8b85dd9ee9e0140 Mon Sep 17 00:00:00 2001 From: Andy Gerlicher Date: Wed, 27 Sep 2017 09:52:43 -0700 Subject: [PATCH 02/40] MSBuild 15.4.8 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 4f43825c2..9d9ec4f9a 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -2,7 +2,7 @@ 2.0.0 - 15.4.7 + 15.4.8 2.3.2-beta1-61921-05 2.3.0-pre-20170727-1 1.6.0-beta2-25304 From 19ce79140885e633c24ada2e94dd4a7e6c775759 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Wed, 27 Sep 2017 15:24:22 -0700 Subject: [PATCH 03/40] Updating the branding to 15.5. --- build/Branding.props | 2 +- build/Version.props | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/Branding.props b/build/Branding.props index 9a66fdc2d..2defb3b47 100644 --- a/build/Branding.props +++ b/build/Branding.props @@ -1,6 +1,6 @@ - Microsoft .NET Core SDK - 2.0.3 + Microsoft .NET Core SDK - 15.5.0 .NET Standard Support for Visual Studio 2015 Microsoft .NET Core Runtime - 2.0.1 Microsoft .NET Core Host - 2.0.1 diff --git a/build/Version.props b/build/Version.props index 2f7ba1395..8e40233c3 100644 --- a/build/Version.props +++ b/build/Version.props @@ -1,9 +1,9 @@ - 2 - 0 - 3 - servicing + 15 + 5 + 0 + preview $(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix) $(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount) From ccbc9f73f7fe5d6ef0a591f96334ff1419ccdfbf Mon Sep 17 00:00:00 2001 From: Mike Lorbetske Date: Fri, 29 Sep 2017 10:43:01 -0700 Subject: [PATCH 04/40] Update the string that is displayed when there's a typo in the profile name or it's not a valid JSON object --- src/dotnet/commands/dotnet-run/LocalizableStrings.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet/commands/dotnet-run/LocalizableStrings.resx b/src/dotnet/commands/dotnet-run/LocalizableStrings.resx index 8cab1941e..a939d42a8 100644 --- a/src/dotnet/commands/dotnet-run/LocalizableStrings.resx +++ b/src/dotnet/commands/dotnet-run/LocalizableStrings.resx @@ -177,7 +177,7 @@ The current {1} is '{2}'. Using launch settings from {0}... - Launch profile is not a JSON object. + A profile with the specified name could not be found or is not a valid JSON object. The launch profile type '{0}' is not supported. From b1fda1c367bb3ebff027192028ce7b2ab1d32a14 Mon Sep 17 00:00:00 2001 From: Mike Lorbetske Date: Fri, 29 Sep 2017 12:59:44 -0700 Subject: [PATCH 05/40] Update XLFs --- src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf | 4 ++-- src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf | 4 ++-- src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf | 4 ++-- src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf | 4 ++-- src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf | 4 ++-- src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf | 4 ++-- src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf | 4 ++-- src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf | 4 ++-- .../commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf | 4 ++-- src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf | 4 ++-- src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf | 4 ++-- .../commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf | 4 ++-- .../commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf | 4 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf index 60ce2ef7b..8ea09aff9 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.cs.xlf @@ -103,8 +103,8 @@ Aktuální {1} je {2}. - Launch profile is not a JSON object. - Profil spuštění není objektem JSON. + A profile with the specified name could not be found or is not a valid JSON object. + Profil spuštění není objektem JSON. diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf index 2349aafdc..c4888a85d 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.de.xlf @@ -103,8 +103,8 @@ Ein ausführbares Projekt sollte ein ausführbares TFM (z.B. netcoreapp2.0) verw - Launch profile is not a JSON object. - Das Startprofil ist kein JSON-Objekt. + A profile with the specified name could not be found or is not a valid JSON object. + Das Startprofil ist kein JSON-Objekt. diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf index 4c05cc144..f22075f6b 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.es.xlf @@ -103,8 +103,8 @@ El actual {1} es "{2}". - Launch profile is not a JSON object. - El perfil de inicio no es un objeto JSON. + A profile with the specified name could not be found or is not a valid JSON object. + El perfil de inicio no es un objeto JSON. diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf index f62af586a..cb25dab6b 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.fr.xlf @@ -103,8 +103,8 @@ Le {1} actuel est '{2}'. - Launch profile is not a JSON object. - Le profil de lancement n'est pas un objet JSON. + A profile with the specified name could not be found or is not a valid JSON object. + Le profil de lancement n'est pas un objet JSON. diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf index ba7512823..13ca40c66 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.it.xlf @@ -103,8 +103,8 @@ Il valore corrente di {1} è '{2}'. - Launch profile is not a JSON object. - Il profilo di avvio non è un oggetto JSON. + A profile with the specified name could not be found or is not a valid JSON object. + Il profilo di avvio non è un oggetto JSON. diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf index fa08955ee..8f52f732c 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ja.xlf @@ -103,8 +103,8 @@ The current {1} is '{2}'. - Launch profile is not a JSON object. - 起動プロファイルが JSON オブジェクトではありません。 + A profile with the specified name could not be found or is not a valid JSON object. + 起動プロファイルが JSON オブジェクトではありません。 diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf index 41a2ec94e..86ff5d88f 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ko.xlf @@ -103,8 +103,8 @@ The current {1} is '{2}'. - Launch profile is not a JSON object. - 시작 프로필이 JSON 개체가 아닙니다. + A profile with the specified name could not be found or is not a valid JSON object. + 시작 프로필이 JSON 개체가 아닙니다. diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf index aab3a4913..b07a84d33 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pl.xlf @@ -103,8 +103,8 @@ Bieżący element {1}: „{2}”. - Launch profile is not a JSON object. - Profil uruchamiania nie jest obiektem JSON. + A profile with the specified name could not be found or is not a valid JSON object. + Profil uruchamiania nie jest obiektem JSON. diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf index 2843c82ef..1e19ebcf8 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.pt-BR.xlf @@ -103,8 +103,8 @@ O {1} atual é '{2}'. - Launch profile is not a JSON object. - O perfil de inicialização não é um objeto JSON. + A profile with the specified name could not be found or is not a valid JSON object. + O perfil de inicialização não é um objeto JSON. diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf index 95b1e0400..cf00bd460 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.ru.xlf @@ -103,8 +103,8 @@ The current {1} is '{2}'. - Launch profile is not a JSON object. - Профиль запуска не является объектом JSON. + A profile with the specified name could not be found or is not a valid JSON object. + Профиль запуска не является объектом JSON. diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf index a3a9211fb..9a21b7da4 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.tr.xlf @@ -103,8 +103,8 @@ Geçerli {1}: '{2}'. - Launch profile is not a JSON object. - Başlatma profili bir JSON nesnesi değil. + A profile with the specified name could not be found or is not a valid JSON object. + Başlatma profili bir JSON nesnesi değil. diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf index a4b5c43c2..4ac5ce35e 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hans.xlf @@ -103,8 +103,8 @@ The current {1} is '{2}'. - Launch profile is not a JSON object. - 启动配置文件不是 JSON 对象。 + A profile with the specified name could not be found or is not a valid JSON object. + 启动配置文件不是 JSON 对象。 diff --git a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf index b9bd6e9c3..05567e529 100644 --- a/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/dotnet/commands/dotnet-run/xlf/LocalizableStrings.zh-Hant.xlf @@ -103,8 +103,8 @@ The current {1} is '{2}'. - Launch profile is not a JSON object. - 啟動設定檔並非 JSON 物件。 + A profile with the specified name could not be found or is not a valid JSON object. + 啟動設定檔並非 JSON 物件。 From fb67e25cfb1c4d13d6b21098a474027b7f8058d7 Mon Sep 17 00:00:00 2001 From: Andy Gerlicher Date: Fri, 29 Sep 2017 13:31:56 -0700 Subject: [PATCH 06/40] MSBuild 15.5.110 --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 3c43151c8..babbcfe03 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -2,7 +2,7 @@ 2.0.1 - 15.4.7 + 15.5.0-preview-000110-1026436 2.3.2-beta1-61921-05 2.3.0-pre-20170727-1 1.6.0-beta2-25304 From 04c8a685392af87d716832bacb3aa87cac0893b9 Mon Sep 17 00:00:00 2001 From: khyperia Date: Mon, 2 Oct 2017 07:56:47 -0700 Subject: [PATCH 07/40] Improve the way Roslyn is pulled in --- Microsoft.DotNet.Cli.sln | 27 ----- build/DependencyVersions.props | 2 +- .../MSBuildForwardingAppWithoutLogging.cs | 29 ++--- src/redist/redist.csproj | 104 +++++++++++++----- src/tool_roslyn/RunCsc.cmd | 6 - src/tool_roslyn/RunCsc.sh | 17 --- src/tool_roslyn/RunVbc.cmd | 6 - src/tool_roslyn/RunVbc.sh | 17 --- src/tool_roslyn/tool_roslyn.csproj | 68 ------------ 9 files changed, 93 insertions(+), 183 deletions(-) delete mode 100644 src/tool_roslyn/RunCsc.cmd delete mode 100755 src/tool_roslyn/RunCsc.sh delete mode 100644 src/tool_roslyn/RunVbc.cmd delete mode 100755 src/tool_roslyn/RunVbc.sh delete mode 100644 src/tool_roslyn/tool_roslyn.csproj diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index 3733528eb..271579431 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -147,8 +147,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.TestFramew EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "redist", "src\redist\redist.csproj", "{098D9321-1201-4974-A75E-F58EBCD98ACF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_roslyn", "src\tool_roslyn\tool_roslyn.csproj", "{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_msbuild", "src\tool_msbuild\tool_msbuild.csproj", "{D82A3246-9831-4024-A9B2-1932EEF3D56F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_nuget", "src\tool_nuget\tool_nuget.csproj", "{BE4C655A-DC54-4408-B739-743456D34111}" @@ -705,30 +703,6 @@ Global {098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x64.Build.0 = Release|Any CPU {098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU {098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x86.Build.0 = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x64.ActiveCfg = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x64.Build.0 = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x86.ActiveCfg = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x86.Build.0 = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x64.ActiveCfg = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x64.Build.0 = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x86.ActiveCfg = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x86.Build.0 = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|Any CPU.Build.0 = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x64.ActiveCfg = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x64.Build.0 = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x86.ActiveCfg = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x86.Build.0 = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU - {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x86.Build.0 = Release|Any CPU {D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|Any CPU.Build.0 = Debug|Any CPU {D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|x64.ActiveCfg = Release|Any CPU @@ -1625,7 +1599,6 @@ Global {570950AD-A080-4F32-980C-F50E312910DF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {6592A22C-2386-4E83-A4D3-FC08075C723A} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {098D9321-1201-4974-A75E-F58EBCD98ACF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} - {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} diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 3c43151c8..c7ddeeb36 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -3,7 +3,7 @@ 2.0.1 15.4.7 - 2.3.2-beta1-61921-05 + 2.6.0-beta1-62126-01 2.3.0-pre-20170727-1 1.6.0-beta2-25304 4.2.0-rc-170630-0 diff --git a/src/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs b/src/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs index 500ab7b30..4a4628198 100644 --- a/src/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs +++ b/src/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs @@ -23,9 +23,12 @@ namespace Microsoft.DotNet.Cli.Utils new Dictionary { { "MSBuildExtensionsPath", AppContext.BaseDirectory }, - { "CscToolExe", GetRunCscPath() }, - { "VbcToolExe", GetRunVbcPath() }, - { "MSBuildSDKsPath", GetMSBuildSDKsPath() } + { "CscToolPath", GetRunToolPath() }, + { "VbcToolPath", GetRunToolPath() }, + { "CscToolExe", GetRunToolExe("Csc") }, + { "VbcToolExe", GetRunToolExe("Vbc") }, + { "MSBuildSDKsPath", GetMSBuildSDKsPath() }, + { "DOTNET_HOST_PATH", GetDotnetPath() }, }; private readonly IEnumerable _msbuildRequiredParameters = @@ -78,20 +81,20 @@ namespace Microsoft.DotNet.Cli.Utils SdksDirectoryName); } - private static string GetRunVbcPath() + private static string GetRunToolPath() { - return GetRunToolPath("Vbc"); - } - - private static string GetRunCscPath() - { - return GetRunToolPath("Csc"); + return Path.Combine(AppContext.BaseDirectory, "Roslyn", "bincore"); } - private static string GetRunToolPath(string compilerName) + private static string GetRunToolExe(string compilerName) { - var scriptExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".cmd" : ".sh"; - return Path.Combine(AppContext.BaseDirectory, "Roslyn", $"Run{compilerName}{scriptExtension}"); + var scriptExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".cmd" : ""; + return $"Run{compilerName}{scriptExtension}"; + } + + private static string GetDotnetPath() + { + return new Muxer().MuxerPath; } } } diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index c45cd6bdf..a58896f12 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -17,15 +17,16 @@ - - - + + All + + + All + @@ -74,9 +75,25 @@ - + + + + + + + + + + + + "version": ".*" + "version": "$(CLI_SharedFrameworkVersion)" + + + + + + - + + - + - + - - + + + + + + + + - - + + + - - - + + + + + + + - + + + + + - - + + diff --git a/src/tool_roslyn/RunCsc.cmd b/src/tool_roslyn/RunCsc.cmd deleted file mode 100644 index 7398082b2..000000000 --- a/src/tool_roslyn/RunCsc.cmd +++ /dev/null @@ -1,6 +0,0 @@ -@echo off - -REM Copyright (c) .NET Foundation and contributors. All rights reserved. -REM Licensed under the MIT license. See LICENSE file in the project root for full license information. - -"%~dp0..\..\..\dotnet" "%~dp0csc.exe" %* diff --git a/src/tool_roslyn/RunCsc.sh b/src/tool_roslyn/RunCsc.sh deleted file mode 100755 index 47aed63d1..000000000 --- a/src/tool_roslyn/RunCsc.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env 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. -# - -set -e - -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - -"$DIR/../../../dotnet" "$DIR/csc.exe" "$@" diff --git a/src/tool_roslyn/RunVbc.cmd b/src/tool_roslyn/RunVbc.cmd deleted file mode 100644 index e891b1bf5..000000000 --- a/src/tool_roslyn/RunVbc.cmd +++ /dev/null @@ -1,6 +0,0 @@ -@echo off - -REM Copyright (c) .NET Foundation and contributors. All rights reserved. -REM Licensed under the MIT license. See LICENSE file in the project root for full license information. - -"%~dp0..\..\..\dotnet" "%~dp0vbc.exe" %* diff --git a/src/tool_roslyn/RunVbc.sh b/src/tool_roslyn/RunVbc.sh deleted file mode 100755 index 3dda886a0..000000000 --- a/src/tool_roslyn/RunVbc.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env 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. -# - -set -e - -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - -"$DIR/../../../dotnet" "$DIR/vbc.exe" "$@" diff --git a/src/tool_roslyn/tool_roslyn.csproj b/src/tool_roslyn/tool_roslyn.csproj deleted file mode 100644 index bd702ca7c..000000000 --- a/src/tool_roslyn/tool_roslyn.csproj +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - $(CliVersionPrefix) - netcoreapp2.0 - $(CLI_SharedFrameworkVersion) - true - $(RoslynDirectory) - $(CommitCount) - - - - - - - - - - - - - - PreserveNewest - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - From 97b027b232e3d891ab007b116da9beb57ffe12ee Mon Sep 17 00:00:00 2001 From: Ashley Hauck Date: Wed, 23 Aug 2017 08:34:33 -0700 Subject: [PATCH 08/40] Remove CscToolPath --- .../MSBuildIntegration/build.proj | 3 --- .../InvokeWithStage2.proj | 2 -- .../MSBuildForwardingAppWithoutLogging.cs | 15 ------------ src/redist/redist.csproj | 2 -- .../GivenMsbuildForwardingApp.cs | 23 ------------------- 5 files changed, 45 deletions(-) diff --git a/TestAssets/TestProjects/MSBuildIntegration/build.proj b/TestAssets/TestProjects/MSBuildIntegration/build.proj index 203f96df3..8b2a7851e 100644 --- a/TestAssets/TestProjects/MSBuildIntegration/build.proj +++ b/TestAssets/TestProjects/MSBuildIntegration/build.proj @@ -29,9 +29,6 @@ - - diff --git a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj index 1493128e7..cb833d480 100644 --- a/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj +++ b/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj @@ -7,8 +7,6 @@ false true - false - true false true diff --git a/src/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs b/src/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs index 4a4628198..39c7fb2df 100644 --- a/src/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs +++ b/src/Microsoft.DotNet.Cli.Utils/MSBuildForwardingAppWithoutLogging.cs @@ -23,10 +23,6 @@ namespace Microsoft.DotNet.Cli.Utils new Dictionary { { "MSBuildExtensionsPath", AppContext.BaseDirectory }, - { "CscToolPath", GetRunToolPath() }, - { "VbcToolPath", GetRunToolPath() }, - { "CscToolExe", GetRunToolExe("Csc") }, - { "VbcToolExe", GetRunToolExe("Vbc") }, { "MSBuildSDKsPath", GetMSBuildSDKsPath() }, { "DOTNET_HOST_PATH", GetDotnetPath() }, }; @@ -81,17 +77,6 @@ namespace Microsoft.DotNet.Cli.Utils SdksDirectoryName); } - private static string GetRunToolPath() - { - return Path.Combine(AppContext.BaseDirectory, "Roslyn", "bincore"); - } - - private static string GetRunToolExe(string compilerName) - { - var scriptExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".cmd" : ""; - return $"Run{compilerName}{scriptExtension}"; - } - private static string GetDotnetPath() { return new Muxer().MuxerPath; diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index a58896f12..4dbd46f5d 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -291,8 +291,6 @@ - - diff --git a/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs b/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs index 4450258ee..4dad315e3 100644 --- a/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs +++ b/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs @@ -31,8 +31,6 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests [Theory] [InlineData("MSBuildExtensionsPath")] - [InlineData("CscToolExe")] - [InlineData("VbcToolExe")] [InlineData("MSBuildSDKsPath")] [InlineData("DOTNET_CLI_TELEMETRY_SESSIONID")] public void ItSetsEnvironmentalVariables(string envVarName) @@ -66,27 +64,6 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests .Exist(); } - [Fact] - public void ItSetsCscToolExePathToValidPath() - { - var msbuildPath = ""; - var envVar = "CscToolExe"; - new FileInfo(new MSBuildForwardingApp(new string[0], msbuildPath) - .GetProcessStartInfo() - .Environment[envVar]) - .Should().NotBeNull("constructor will throw on invalid path"); - } - - [Fact] - public void ItSetsVbcToolExePathToValidPath() - { - var msbuildPath = ""; - var envVar = "VbcToolExe"; - new FileInfo(new MSBuildForwardingApp(new string[0], msbuildPath) - .GetProcessStartInfo() - .Environment[envVar]) - .Should().NotBeNull("constructor will throw on invalid path"); - } [Fact] public void ItSetsOrIgnoresTelemetrySessionId() From 6ccff28e0a9585fe3431ab16b2ee87b1d3b9ac99 Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Fri, 29 Sep 2017 15:59:36 -0700 Subject: [PATCH 09/40] Update F# compiler --- build/DependencyVersions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 3c43151c8..077afea18 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -6,7 +6,7 @@ 2.3.2-beta1-61921-05 2.3.0-pre-20170727-1 1.6.0-beta2-25304 - 4.2.0-rc-170630-0 + 4.2.0-rtm-170926-0 4.4.1-pre-20170727-1 + diff --git a/NuGet.master.config b/NuGet.master.config index b004e5cc7..0d17ce122 100644 --- a/NuGet.master.config +++ b/NuGet.master.config @@ -2,6 +2,6 @@ - + \ No newline at end of file From ddae0875cf1adaeb0575bffc34630a078d6b8cca Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Mon, 9 Oct 2017 13:55:13 -0700 Subject: [PATCH 16/40] Revert release/2.0.0 back to 1bcee43995cd6e01b5abc67b5f7b4422c32d5491 There were incorrect merges from release/15.5 to release/2.0.0 since then --- Microsoft.DotNet.Cli.sln | 27 +++++ .../MSBuildIntegration/build.proj | 3 + build/DependencyVersions.props | 12 +- build/Microsoft.DotNet.Cli.tasks | 1 - .../InvokeWithStage2.proj | 2 + build_projects/dotnet-cli-build/AddToDeps.cs | 67 ----------- .../dotnet-cli-build/dotnet-cli-build.csproj | 1 - .../MSBuildForwardingAppWithoutLogging.cs | 20 +++- .../dotnet-run/LocalizableStrings.resx | 2 +- .../dotnet-run/xlf/LocalizableStrings.cs.xlf | 4 +- .../dotnet-run/xlf/LocalizableStrings.de.xlf | 4 +- .../dotnet-run/xlf/LocalizableStrings.es.xlf | 4 +- .../dotnet-run/xlf/LocalizableStrings.fr.xlf | 4 +- .../dotnet-run/xlf/LocalizableStrings.it.xlf | 4 +- .../dotnet-run/xlf/LocalizableStrings.ja.xlf | 4 +- .../dotnet-run/xlf/LocalizableStrings.ko.xlf | 4 +- .../dotnet-run/xlf/LocalizableStrings.pl.xlf | 4 +- .../xlf/LocalizableStrings.pt-BR.xlf | 4 +- .../dotnet-run/xlf/LocalizableStrings.ru.xlf | 4 +- .../dotnet-run/xlf/LocalizableStrings.tr.xlf | 4 +- .../xlf/LocalizableStrings.zh-Hans.xlf | 4 +- .../xlf/LocalizableStrings.zh-Hant.xlf | 4 +- src/redist/redist.csproj | 107 +++++------------- src/tool_roslyn/RunCsc.cmd | 6 + src/tool_roslyn/RunCsc.sh | 17 +++ src/tool_roslyn/RunVbc.cmd | 6 + src/tool_roslyn/RunVbc.sh | 17 +++ src/tool_roslyn/tool_roslyn.csproj | 68 +++++++++++ .../tool_roslyn_satellites.csproj | 35 ------ .../GivenAProjectToolsCommandResolver.cs | 2 +- .../GivenMsbuildForwardingApp.cs | 23 ++++ 31 files changed, 247 insertions(+), 221 deletions(-) delete mode 100644 build_projects/dotnet-cli-build/AddToDeps.cs create mode 100644 src/tool_roslyn/RunCsc.cmd create mode 100755 src/tool_roslyn/RunCsc.sh create mode 100644 src/tool_roslyn/RunVbc.cmd create mode 100755 src/tool_roslyn/RunVbc.sh create mode 100644 src/tool_roslyn/tool_roslyn.csproj delete mode 100644 src/tool_roslyn_satellites/tool_roslyn_satellites.csproj diff --git a/Microsoft.DotNet.Cli.sln b/Microsoft.DotNet.Cli.sln index 271579431..3733528eb 100644 --- a/Microsoft.DotNet.Cli.sln +++ b/Microsoft.DotNet.Cli.sln @@ -147,6 +147,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.TestFramew EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "redist", "src\redist\redist.csproj", "{098D9321-1201-4974-A75E-F58EBCD98ACF}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_roslyn", "src\tool_roslyn\tool_roslyn.csproj", "{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_msbuild", "src\tool_msbuild\tool_msbuild.csproj", "{D82A3246-9831-4024-A9B2-1932EEF3D56F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_nuget", "src\tool_nuget\tool_nuget.csproj", "{BE4C655A-DC54-4408-B739-743456D34111}" @@ -703,6 +705,30 @@ Global {098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x64.Build.0 = Release|Any CPU {098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU {098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x86.Build.0 = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x64.ActiveCfg = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x64.Build.0 = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x86.ActiveCfg = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x86.Build.0 = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x64.ActiveCfg = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x64.Build.0 = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x86.ActiveCfg = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x86.Build.0 = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|Any CPU.Build.0 = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x64.ActiveCfg = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x64.Build.0 = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x86.ActiveCfg = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x86.Build.0 = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU + {A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x86.Build.0 = Release|Any CPU {D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|Any CPU.Build.0 = Debug|Any CPU {D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|x64.ActiveCfg = Release|Any CPU @@ -1599,6 +1625,7 @@ Global {570950AD-A080-4F32-980C-F50E312910DF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {6592A22C-2386-4E83-A4D3-FC08075C723A} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {098D9321-1201-4974-A75E-F58EBCD98ACF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} + {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} diff --git a/TestAssets/TestProjects/MSBuildIntegration/build.proj b/TestAssets/TestProjects/MSBuildIntegration/build.proj index 8b2a7851e..203f96df3 100644 --- a/TestAssets/TestProjects/MSBuildIntegration/build.proj +++ b/TestAssets/TestProjects/MSBuildIntegration/build.proj @@ -29,6 +29,9 @@ + + diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 5f02dd04b..3c43151c8 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,13 +1,13 @@ - 2.0.0 - 15.5.0-preview-000113-1032064 - 2.6.0-beta1-62126-01 - 2.6.0-pre-20171003-1 + 2.0.1 + 15.4.7 + 2.3.2-beta1-61921-05 + 2.3.0-pre-20170727-1 1.6.0-beta2-25304 - 4.2.0-rtm-170926-0 - 4.4.1-pre-20171003-1 + 4.2.0-rc-170630-0 + 4.4.1-pre-20170727-1 + @@ -72,33 +74,9 @@ - - - - - - - - - - - - - - "version": ".*" - "version": "$(CLI_SharedFrameworkVersion)" - - - - - + - - - - - - + - + - + - - - - - - - - + + - - - - - - - - - - + + + + + - - - - - + + + diff --git a/src/tool_roslyn/RunCsc.cmd b/src/tool_roslyn/RunCsc.cmd new file mode 100644 index 000000000..7398082b2 --- /dev/null +++ b/src/tool_roslyn/RunCsc.cmd @@ -0,0 +1,6 @@ +@echo off + +REM Copyright (c) .NET Foundation and contributors. All rights reserved. +REM Licensed under the MIT license. See LICENSE file in the project root for full license information. + +"%~dp0..\..\..\dotnet" "%~dp0csc.exe" %* diff --git a/src/tool_roslyn/RunCsc.sh b/src/tool_roslyn/RunCsc.sh new file mode 100755 index 000000000..47aed63d1 --- /dev/null +++ b/src/tool_roslyn/RunCsc.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env 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. +# + +set -e + +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located +done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + +"$DIR/../../../dotnet" "$DIR/csc.exe" "$@" diff --git a/src/tool_roslyn/RunVbc.cmd b/src/tool_roslyn/RunVbc.cmd new file mode 100644 index 000000000..e891b1bf5 --- /dev/null +++ b/src/tool_roslyn/RunVbc.cmd @@ -0,0 +1,6 @@ +@echo off + +REM Copyright (c) .NET Foundation and contributors. All rights reserved. +REM Licensed under the MIT license. See LICENSE file in the project root for full license information. + +"%~dp0..\..\..\dotnet" "%~dp0vbc.exe" %* diff --git a/src/tool_roslyn/RunVbc.sh b/src/tool_roslyn/RunVbc.sh new file mode 100755 index 000000000..3dda886a0 --- /dev/null +++ b/src/tool_roslyn/RunVbc.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env 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. +# + +set -e + +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located +done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + +"$DIR/../../../dotnet" "$DIR/vbc.exe" "$@" diff --git a/src/tool_roslyn/tool_roslyn.csproj b/src/tool_roslyn/tool_roslyn.csproj new file mode 100644 index 000000000..bd702ca7c --- /dev/null +++ b/src/tool_roslyn/tool_roslyn.csproj @@ -0,0 +1,68 @@ + + + + + + $(CliVersionPrefix) + netcoreapp2.0 + $(CLI_SharedFrameworkVersion) + true + $(RoslynDirectory) + $(CommitCount) + + + + + + + + + + + + + + PreserveNewest + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/tool_roslyn_satellites/tool_roslyn_satellites.csproj b/src/tool_roslyn_satellites/tool_roslyn_satellites.csproj deleted file mode 100644 index 9c6a3a346..000000000 --- a/src/tool_roslyn_satellites/tool_roslyn_satellites.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - $(CliVersionPrefix) - $(CliTargetFramework) - $(CLI_SharedFrameworkVersion) - $(RoslynDirectory)/bincore - $(CommitCount) - false - false - false - - - - - - - - - - - - - - - - - - diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs index 83a877151..7fe281b5d 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs @@ -309,7 +309,7 @@ namespace Microsoft.DotNet.Tests result.Should().NotBeNull(); - result.Args.Should().Contain("--fx-version 2.0.0"); + result.Args.Should().Contain("--fx-version 2.0.1"); } [Fact] diff --git a/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs b/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs index 4dad315e3..4450258ee 100644 --- a/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs +++ b/test/dotnet-msbuild.Tests/GivenMsbuildForwardingApp.cs @@ -31,6 +31,8 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests [Theory] [InlineData("MSBuildExtensionsPath")] + [InlineData("CscToolExe")] + [InlineData("VbcToolExe")] [InlineData("MSBuildSDKsPath")] [InlineData("DOTNET_CLI_TELEMETRY_SESSIONID")] public void ItSetsEnvironmentalVariables(string envVarName) @@ -64,6 +66,27 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests .Exist(); } + [Fact] + public void ItSetsCscToolExePathToValidPath() + { + var msbuildPath = ""; + var envVar = "CscToolExe"; + new FileInfo(new MSBuildForwardingApp(new string[0], msbuildPath) + .GetProcessStartInfo() + .Environment[envVar]) + .Should().NotBeNull("constructor will throw on invalid path"); + } + + [Fact] + public void ItSetsVbcToolExePathToValidPath() + { + var msbuildPath = ""; + var envVar = "VbcToolExe"; + new FileInfo(new MSBuildForwardingApp(new string[0], msbuildPath) + .GetProcessStartInfo() + .Environment[envVar]) + .Should().NotBeNull("constructor will throw on invalid path"); + } [Fact] public void ItSetsOrIgnoresTelemetrySessionId() From fead8521c3ace140ab127249c2f1d217c2dbcafc Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Tue, 3 Oct 2017 16:46:15 -0700 Subject: [PATCH 17/40] Moving the runtime version to 2.0.0 for the SDK. (cherry picked from commit e24b53dda7b05854085160c5214dcf75ead562b6) --- build/DependencyVersions.props | 2 +- .../GivenAProjectToolsCommandResolver.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index 3c43151c8..4e39a1858 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,7 +1,7 @@ - 2.0.1 + 2.0.0 15.4.7 2.3.2-beta1-61921-05 2.3.0-pre-20170727-1 diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs index 7fe281b5d..83a877151 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs @@ -309,7 +309,7 @@ namespace Microsoft.DotNet.Tests result.Should().NotBeNull(); - result.Args.Should().Contain("--fx-version 2.0.1"); + result.Args.Should().Contain("--fx-version 2.0.0"); } [Fact] From b951b946293607b7789a6c4e39d2cb0b7b6eee36 Mon Sep 17 00:00:00 2001 From: jbeisner Date: Tue, 10 Oct 2017 10:34:32 -0700 Subject: [PATCH 18/40] Reverting previous change to: 'NuGet.master.config' --- NuGet.master.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuGet.master.config b/NuGet.master.config index 0d17ce122..b004e5cc7 100644 --- a/NuGet.master.config +++ b/NuGet.master.config @@ -2,6 +2,6 @@ - + \ No newline at end of file From 903001c51c7bca5f37d340778e7a60611df13cb2 Mon Sep 17 00:00:00 2001 From: John Beisner Date: Wed, 11 Oct 2017 10:25:55 -0700 Subject: [PATCH 19/40] 'NuGet.master.config' does not appear to be used. --- NuGet.master.config | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 NuGet.master.config diff --git a/NuGet.master.config b/NuGet.master.config deleted file mode 100644 index b004e5cc7..000000000 --- a/NuGet.master.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file From 282de2bfe2d31d2a1aa2e8cc99115c8fe929ae8c Mon Sep 17 00:00:00 2001 From: John Beisner Date: Wed, 11 Oct 2017 10:53:53 -0700 Subject: [PATCH 20/40] Porting 'dotnet-install.sh' from CLI:master to CLI:release/2.0.0 --- scripts/obtain/dotnet-install.sh | 171 ++++++++++++++++--------------- 1 file changed, 86 insertions(+), 85 deletions(-) diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index a3a7b6ed8..1db273f24 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -240,7 +240,7 @@ to_lowercase() { remove_trailing_slash() { #eval $invocation - local input=${1:-} + local input="${1:-}" echo "${input%/}" return 0 } @@ -250,7 +250,7 @@ remove_trailing_slash() { remove_beginning_slash() { #eval $invocation - local input=${1:-} + local input="${1:-}" echo "${input#/}" return 0 } @@ -267,8 +267,8 @@ combine_paths() { return 1 fi - local root_path=$(remove_trailing_slash $1) - local child_path=$(remove_beginning_slash ${2:-}) + local root_path="$(remove_trailing_slash "$1")" + local child_path="$(remove_beginning_slash "${2:-}")" say_verbose "combine_paths: root_path=$root_path" say_verbose "combine_paths: child_path=$child_path" echo "$root_path/$child_path" @@ -288,10 +288,10 @@ get_machine_architecture() { get_normalized_architecture_from_architecture() { eval $invocation - local architecture=$(to_lowercase $1) - case $architecture in + local architecture="$(to_lowercase "$1")" + case "$architecture" in \) - echo "$(get_normalized_architecture_from_architecture $(get_machine_architecture))" + echo "$(get_normalized_architecture_from_architecture "$(get_machine_architecture)")" return 0 ;; amd64|x64) @@ -338,11 +338,11 @@ get_commit_hash_from_version_info() { is_dotnet_package_installed() { eval $invocation - local install_root=$1 - local relative_path_to_package=$2 - local specific_version=${3//[$'\t\r\n']} + local install_root="$1" + local relative_path_to_package="$2" + local specific_version="${3//[$'\t\r\n']}" - local dotnet_package_path=$(combine_paths $(combine_paths $install_root $relative_path_to_package) $specific_version) + local dotnet_package_path="$(combine_paths "$(combine_paths "$install_root" "$relative_path_to_package")" "$specific_version")" say_verbose "is_dotnet_package_installed: dotnet_package_path=$dotnet_package_path" if [ -d "$dotnet_package_path" ]; then @@ -360,10 +360,10 @@ is_dotnet_package_installed() { get_latest_version_info() { eval $invocation - local azure_feed=$1 - local channel=$2 - local normalized_architecture=$3 - local coherent=$4 + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local coherent="$4" local version_file_url=null if [ "$shared_runtime" = true ]; then @@ -377,7 +377,7 @@ get_latest_version_info() { fi say_verbose "get_latest_version_info: latest url: $version_file_url" - download $version_file_url + download "$version_file_url" return $? } @@ -389,28 +389,28 @@ get_latest_version_info() { get_specific_version_from_version() { eval $invocation - local azure_feed=$1 - local channel=$2 - local normalized_architecture=$3 - local version=$(to_lowercase $4) + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local version="$(to_lowercase "$4")" - case $version in + case "$version" in latest) local version_info - version_info="$(get_latest_version_info $azure_feed $channel $normalized_architecture false)" || return 1 + version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1 say_verbose "get_specific_version_from_version: version_info=$version_info" echo "$version_info" | get_version_from_version_info return 0 ;; coherent) local version_info - version_info="$(get_latest_version_info $azure_feed $channel $normalized_architecture true)" || return 1 + version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" true)" || return 1 say_verbose "get_specific_version_from_version: version_info=$version_info" echo "$version_info" | get_version_from_version_info return 0 ;; *) - echo $version + echo "$version" return 0 ;; esac @@ -424,13 +424,13 @@ get_specific_version_from_version() { construct_download_link() { eval $invocation - local azure_feed=$1 - local channel=$2 - local normalized_architecture=$3 - local specific_version=${4//[$'\t\r\n']} + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local specific_version="${4//[$'\t\r\n']}" local osname - osname=$(get_current_os_name) || return 1 + osname="$(get_current_os_name)" || return 1 local download_link=null if [ "$shared_runtime" = true ]; then @@ -451,13 +451,13 @@ construct_download_link() { construct_legacy_download_link() { eval $invocation - local azure_feed=$1 - local channel=$2 - local normalized_architecture=$3 - local specific_version=${4//[$'\t\r\n']} + local azure_feed="$1" + local channel="$2" + local normalized_architecture="$3" + local specific_version="${4//[$'\t\r\n']}" local distro_specific_osname - distro_specific_osname=$(get_distro_specific_os_name) || return 1 + distro_specific_osname="$(get_distro_specific_os_name)" || return 1 local legacy_download_link=null if [ "$shared_runtime" = true ]; then @@ -474,7 +474,7 @@ get_user_install_path() { eval $invocation if [ ! -z "${DOTNET_INSTALL_DIR:-}" ]; then - echo $DOTNET_INSTALL_DIR + echo "$DOTNET_INSTALL_DIR" else echo "$HOME/.dotnet" fi @@ -488,7 +488,7 @@ resolve_installation_path() { local install_dir=$1 if [ "$install_dir" = "" ]; then - local user_install_path=$(get_user_install_path) + local user_install_path="$(get_user_install_path)" say_verbose "resolve_installation_path: user_install_path=$user_install_path" echo "$user_install_path" return 0 @@ -503,11 +503,11 @@ resolve_installation_path() { get_installed_version_info() { eval $invocation - local install_root=$1 - local version_file=$(combine_paths "$install_root" "$local_version_file_relative_path") + local install_root="$1" + local version_file="$(combine_paths "$install_root" "$local_version_file_relative_path")" say_verbose "Local version file: $version_file" if [ ! -z "$version_file" ] | [ -r "$version_file" ]; then - local version_info="$(cat $version_file)" + local version_info="$(cat "$version_file")" echo "$version_info" return 0 fi @@ -522,7 +522,7 @@ get_absolute_path() { eval $invocation local relative_or_absolute_path=$1 - echo $(cd $(dirname "$1") && pwd -P)/$(basename "$1") + echo "$(cd "$(dirname "$1")" && pwd -P)/$(basename "$1")" return 0 } @@ -534,17 +534,17 @@ get_absolute_path() { copy_files_or_dirs_from_list() { eval $invocation - local root_path=$(remove_trailing_slash $1) - local out_path=$(remove_trailing_slash $2) - local override=$3 + local root_path="$(remove_trailing_slash "$1")" + local out_path="$(remove_trailing_slash "$2")" + local override="$3" local override_switch=$(if [ "$override" = false ]; then printf -- "-n"; fi) cat | uniq | while read -r file_path; do - local path=$(remove_beginning_slash ${file_path#$root_path}) - local target=$out_path/$path + local path="$(remove_beginning_slash "${file_path#$root_path}")" + local target="$out_path/$path" if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then - mkdir -p $out_path/$(dirname $path) - cp -R $override_switch $root_path/$path $target + mkdir -p "$out_path/$(dirname "$path")" + cp -R $override_switch "$root_path/$path" "$target" fi done } @@ -555,19 +555,19 @@ copy_files_or_dirs_from_list() { extract_dotnet_package() { eval $invocation - local zip_path=$1 - local out_path=$2 + local zip_path="$1" + local out_path="$2" - local temp_out_path=$(mktemp -d $temporary_file_template) + local temp_out_path="$(mktemp -d "$temporary_file_template")" local failed=false tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/' - find $temp_out_path -type f | grep -Eo $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path false - find $temp_out_path -type f | grep -Ev $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path $override_non_versioned_files + find "$temp_out_path" -type f | grep -Eo "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" false + find "$temp_out_path" -type f | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files" - rm -rf $temp_out_path + rm -rf "$temp_out_path" if [ "$failed" = true ]; then say_err "Extraction failed" @@ -581,14 +581,14 @@ extract_dotnet_package() { download() { eval $invocation - local remote_path=$1 - local out_path=${2:-} + local remote_path="$1" + local out_path="${2:-}" local failed=false if machine_has "curl"; then - downloadcurl $remote_path $out_path || failed=true + downloadcurl "$remote_path" "$out_path" || failed=true elif machine_has "wget"; then - downloadwget $remote_path $out_path || failed=true + downloadwget "$remote_path" "$out_path" || failed=true else failed=true fi @@ -601,14 +601,14 @@ download() { downloadcurl() { eval $invocation - local remote_path=$1 - local out_path=${2:-} + local remote_path="$1" + local out_path="${2:-}" local failed=false if [ -z "$out_path" ]; then - curl --retry 10 -sSL -f --create-dirs $remote_path || failed=true + curl --retry 10 -sSL -f --create-dirs "$remote_path" || failed=true else - curl --retry 10 -sSL -f --create-dirs -o $out_path $remote_path || failed=true + curl --retry 10 -sSL -f --create-dirs -o "$out_path" "$remote_path" || failed=true fi if [ "$failed" = true ]; then say_verbose "Curl download failed" @@ -619,14 +619,14 @@ downloadcurl() { downloadwget() { eval $invocation - local remote_path=$1 - local out_path=${2:-} + local remote_path="$1" + local out_path="${2:-}" local failed=false if [ -z "$out_path" ]; then - wget -q --tries 10 -O - $remote_path || failed=true + wget -q --tries 10 -O - "$remote_path" || failed=true else - wget -v --tries 10 -O $out_path $remote_path || failed=true + wget -v --tries 10 -O "$out_path" "$remote_path" || failed=true fi if [ "$failed" = true ]; then say_verbose "Wget download failed" @@ -639,20 +639,20 @@ calculate_vars() { eval $invocation valid_legacy_download_link=true - normalized_architecture=$(get_normalized_architecture_from_architecture "$architecture") + normalized_architecture="$(get_normalized_architecture_from_architecture "$architecture")" say_verbose "normalized_architecture=$normalized_architecture" - specific_version=$(get_specific_version_from_version $azure_feed $channel $normalized_architecture $version) + specific_version="$(get_specific_version_from_version "$azure_feed" "$channel" "$normalized_architecture" "$version")" say_verbose "specific_version=$specific_version" if [ -z "$specific_version" ]; then say_err "Could not get version information." return 1 fi - download_link=$(construct_download_link $azure_feed $channel $normalized_architecture $specific_version) + download_link="$(construct_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" say_verbose "download_link=$download_link" - legacy_download_link=$(construct_legacy_download_link $azure_feed $channel $normalized_architecture $specific_version) || valid_legacy_download_link=false + legacy_download_link="$(construct_legacy_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" || valid_legacy_download_link=false if [ "$valid_legacy_download_link" = true ]; then say_verbose "legacy_download_link=$legacy_download_link" @@ -660,7 +660,7 @@ calculate_vars() { say_verbose "Cound not construct a legacy_download_link; omitting..." fi - install_root=$(resolve_installation_path $install_dir) + install_root="$(resolve_installation_path "$install_dir")" say_verbose "install_root=$install_root" } @@ -668,32 +668,33 @@ install_dotnet() { eval $invocation local download_failed=false - if is_dotnet_package_installed $install_root "sdk" $specific_version; then + if is_dotnet_package_installed "$install_root" "sdk" "$specific_version"; then say ".NET SDK version $specific_version is already installed." return 0 fi - mkdir -p $install_root - zip_path=$(mktemp $temporary_file_template) + mkdir -p "$install_root" + zip_path="$(mktemp "$temporary_file_template")" say_verbose "Zip path: $zip_path" say "Downloading link: $download_link" + # Failures are normal in the non-legacy case for ultimately legacy downloads. # Do not output to stderr, since output to stderr is considered an error. - download "$download_link" $zip_path 2>&1 || download_failed=true + download "$download_link" "$zip_path" 2>&1 || download_failed=true # if the download fails, download the legacy_download_link if [ "$download_failed" = true ] && [ "$valid_legacy_download_link" = true ]; then say "Cannot download: $download_link" - download_link=$legacy_download_link - zip_path=$(mktemp $temporary_file_template) + download_link="$legacy_download_link" + zip_path="$(mktemp "$temporary_file_template")" say_verbose "Legacy zip path: $zip_path" say "Downloading legacy link: $download_link" - download "$download_link" $zip_path + download "$download_link" "$zip_path" fi say "Extracting zip from $download_link" - extract_dotnet_package $zip_path $install_root + extract_dotnet_package "$zip_path" "$install_root" return 0 } @@ -717,11 +718,11 @@ override_non_versioned_files=true while [ $# -ne 0 ] do - name=$1 - case $name in + name="$1" + case "$name" in -c|--channel|-[Cc]hannel) shift - channel=$1 + channel="$1" ;; -v|--version|-[Vv]ersion) shift @@ -764,7 +765,7 @@ do override_non_versioned_files=false ;; -?|--?|-h|--help|-[Hh]elp) - script_name="$(basename $0)" + script_name="$(basename "$0")" echo ".NET Tools Installer" echo "Usage: $script_name [-c|--channel ] [-v|--version ] [-p|--prefix ]" echo " $script_name -h|-?|--help" @@ -830,17 +831,17 @@ if [ "$dry_run" = true ]; then if [ "$valid_legacy_download_link" = true ]; then say "Legacy payload URL: $legacy_download_link" fi - say "Repeatable invocation: ./$(basename $0) --version $specific_version --channel $channel --install-dir $install_dir" + say "Repeatable invocation: ./$(basename "$0") --version $specific_version --channel $channel --install-dir $install_dir" exit 0 fi check_pre_reqs install_dotnet -bin_path=$(get_absolute_path $(combine_paths $install_root $bin_folder_relative_path)) +bin_path="$(get_absolute_path "$(combine_paths "$install_root" "$bin_folder_relative_path")")" if [ "$no_path" = false ]; then say "Adding to current process PATH: \`$bin_path\`. Note: This change will be visible only when sourcing script." - export PATH=$bin_path:$PATH + export PATH="$bin_path":"$PATH" else say "Binaries of dotnet can be found in $bin_path" fi From b6c2dbf4c6f52d1b218806465ffa3fd9ee6570e4 Mon Sep 17 00:00:00 2001 From: Livar Date: Thu, 12 Oct 2017 16:25:30 -0700 Subject: [PATCH 21/40] Updating channel to dev/release/2.0 --- build/BranchInfo.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/BranchInfo.props b/build/BranchInfo.props index 622960a55..bf76d2572 100644 --- a/build/BranchInfo.props +++ b/build/BranchInfo.props @@ -1,6 +1,6 @@ - release/2.0.0 - release/2.0.0 + dev/release/2.0 + dev/release/2.0 From e59fd7af46bc99df0395446fe7460ef7c135e2b2 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Fri, 6 Oct 2017 10:53:21 -0700 Subject: [PATCH 22/40] Use temporary path for fake deps.json in test (cherry picked from commit 796b4a06e7f095cb9f89d3eb7f29496627286b0d) --- .../GivenAProjectToolsCommandResolver.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs index 83a877151..8f857caf1 100644 --- a/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs +++ b/test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs @@ -266,14 +266,8 @@ namespace Microsoft.DotNet.Tests var lockFile = new LockFileFormat().Read(lockFilePath); - var depsJsonFile = Path.Combine( - Path.GetDirectoryName(lockFilePath), - "dotnet-portable.deps.json"); - - if (File.Exists(depsJsonFile)) - { - File.Delete(depsJsonFile); - } + // NOTE: We must not use the real deps.json path here as it will interfere with tests running in parallel. + var depsJsonFile = Path.GetTempFileName(); File.WriteAllText(depsJsonFile, "temp"); var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); From 3d52d24058ca9c32b1c82462091c168f94a64476 Mon Sep 17 00:00:00 2001 From: John Beisner Date: Fri, 13 Oct 2017 09:43:04 -0700 Subject: [PATCH 23/40] Separating the 'legacy' URL construction from the 'current' URL construction methods and logic. --- scripts/obtain/dotnet-install.sh | 54 ++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index 1db273f24..e409fe06d 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -58,7 +58,7 @@ say_verbose() { # This platform list is finite - if the SDK/Runtime has supported Linux distribution-specific assets, # then and only then should the Linux distribution appear in this list. # Adding a Linux distribution to this list does not imply distribution-specific support. -get_os_download_name_from_platform() { +get_legacy_os_name_from_platform() { eval $invocation platform="$1" @@ -87,10 +87,6 @@ get_os_download_name_from_platform() { echo "opensuse.42.1" return 0 ;; - "rhel.6"*) - echo "rhel.6" - return 0 - ;; "rhel.7"*) echo "rhel" return 0 @@ -115,6 +111,30 @@ get_os_download_name_from_platform() { return 1 } +get_linux_platform_name() { + eval $invocation + + if [ -n "$runtime_id" ]; then + echo "${runtime_id%-*}" + return 0 + else + if [ -e /etc/os-release ]; then + . /etc/os-release + echo "$ID.$VERSION_ID" + return 0 + elif [ -e /etc/redhat-release ]; then + local redhatRelease=$( Date: Thu, 11 May 2017 17:56:24 -0700 Subject: [PATCH 24/40] Provide a way to not include the ASP.NET Runtime Packages --- build/BuildDefaults.props | 1 + build/BundledRuntimes.props | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/BuildDefaults.props b/build/BuildDefaults.props index 8561a45b0..ae7b03962 100644 --- a/build/BuildDefaults.props +++ b/build/BuildDefaults.props @@ -4,6 +4,7 @@ Debug true false + true true true true diff --git a/build/BundledRuntimes.props b/build/BundledRuntimes.props index 5828d0c23..43af1746e 100644 --- a/build/BundledRuntimes.props +++ b/build/BundledRuntimes.props @@ -80,21 +80,21 @@ <_DownloadAndExtractItem Include="AspNetCoreRuntimeInstallerWixLibFile" - Condition=" '$(AspNetCoreRuntimeInstallerWixLibFile)' != '' And !Exists('$(AspNetCoreRuntimeInstallerWixLibFile)')"> + Condition="'$(IncludeAspNetCoreRuntime)' == 'true' And '$(SkipBuildingInstallers)' != 'true' And '$(AspNetCoreRuntimeInstallerWixLibFile)' != '' And !Exists('$(AspNetCoreRuntimeInstallerWixLibFile)')"> $(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerWixLibFileName)$(CoreSetupBlobAccessTokenParam) $(AspNetCoreRuntimeInstallerWixLibFile) <_DownloadAndExtractItem Include="AspNetCoreRuntimeInstallerArchiveFile" - Condition="!Exists('$(AspNetCoreRuntimeInstallerArchiveFile)')"> + Condition="'$(IncludeAspNetCoreRuntime)' == 'true' And !Exists('$(AspNetCoreRuntimeInstallerArchiveFile)')"> $(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerArchiveFileName)$(CoreSetupBlobAccessTokenParam) $(AspNetCoreRuntimeInstallerArchiveFile) $(AspNetRuntimePackageStorePublishDirectory) <_DownloadAndExtractItem Include="AspNetCoreSharedRuntimeVersionFile" - Condition="!Exists('$(AspNetCoreSharedRuntimeVersionFile)')"> + Condition="'$(IncludeAspNetCoreRuntime)' == 'true' And !Exists('$(AspNetCoreSharedRuntimeVersionFile)')"> $(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreSharedRuntimeVersionFileName)$(CoreSetupBlobAccessTokenParam) $(AspNetCoreSharedRuntimeVersionFile) From 428d541627d529dfab097882f99a8bc3190ddaba Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Thu, 11 May 2017 17:58:28 -0700 Subject: [PATCH 25/40] Provide a way to not include the SDK Resolver When building the entire stack for a non windows target, the windows resolver packages will not be present (and in the case of a windows build, you'd only have one architecture anyway). Provide a way to opt out of including the resolver. It's only interesting for Visual Studio insertion cases, which is something the community at large doesn't need to worry about. --- build/BuildDefaults.props | 1 + build/Compile.targets | 5 +++-- build/Prepare.targets | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build/BuildDefaults.props b/build/BuildDefaults.props index ae7b03962..60977b327 100644 --- a/build/BuildDefaults.props +++ b/build/BuildDefaults.props @@ -5,6 +5,7 @@ true false true + true true true true diff --git a/build/Compile.targets b/build/Compile.targets index d2a3747aa..044c10303 100644 --- a/build/Compile.targets +++ b/build/Compile.targets @@ -14,11 +14,12 @@ Targets="Publish" /> - + diff --git a/build/Prepare.targets b/build/Prepare.targets index 3b373ecfc..d363483a5 100644 --- a/build/Prepare.targets +++ b/build/Prepare.targets @@ -68,7 +68,8 @@ - + + From eacc4d248c4789e0c28825200e11c526e524fae8 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Mon, 22 May 2017 11:37:59 -0700 Subject: [PATCH 26/40] Don't pull down stage 0 from the internet The composed build will set `PREBUILT_DOTNET_TOOL_DIR` to a location where the dotnet tool can be copied from. Long term we should get rid of the copy in favor of just using one from a common location, but some of the Stage0 logic in the CLI build system will need to change, I think. --- .../update-dependencies/update-dependencies.ps1 | 4 +--- .../update-dependencies/update-dependencies.sh | 11 ++++------- run-build.ps1 | 10 +--------- run-build.sh | 8 +------- 4 files changed, 7 insertions(+), 26 deletions(-) diff --git a/build_projects/update-dependencies/update-dependencies.ps1 b/build_projects/update-dependencies/update-dependencies.ps1 index b76d10bc1..e6422b1b2 100644 --- a/build_projects/update-dependencies/update-dependencies.ps1 +++ b/build_projects/update-dependencies/update-dependencies.ps1 @@ -35,9 +35,7 @@ if (!$env:DOTNET_INSTALL_DIR) } # Install a stage 0 -Write-Output "Installing .NET Core CLI Stage 0" -& "$RepoRoot\scripts\obtain\dotnet-install.ps1" -Channel "master" -Architecture $Architecture -if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" } +cp -r $env:DOTNET_TOOL_DIR $env:DOTNET_INSTALL_DIR # Put the stage0 on the path $env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH" diff --git a/build_projects/update-dependencies/update-dependencies.sh b/build_projects/update-dependencies/update-dependencies.sh index 4781c8453..8a0d7f940 100755 --- a/build_projects/update-dependencies/update-dependencies.sh +++ b/build_projects/update-dependencies/update-dependencies.sh @@ -30,15 +30,12 @@ if [ -z "${DOTNET_INSTALL_DIR:-}" ]; then export DOTNET_INSTALL_DIR=$REPO_ROOT/.dotnet_stage0/x64 fi -# Install a stage 0 -echo "Installing .NET Core CLI Stage 0" -$REPO_ROOT/scripts/obtain/dotnet-install.sh -Channel master -Architecture x64 - -if [ $? -ne 0 ]; then - echo "Failed to install stage 0" - exit 1 +if [ ! -d "$DOTNET_INSTALL_DIR" ]; then + mkdir -p $DOTNET_INSTALL_DIR fi +cp -r $DOTNET_TOOL_DIR/* $DOTNET_INSTALL_DIR/ + # Put the stage 0 on the path export PATH=$DOTNET_INSTALL_DIR:$PATH diff --git a/run-build.ps1 b/run-build.ps1 index 6acbb15ce..ea5df284b 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -66,15 +66,7 @@ $env:VSTEST_BUILD_TRACE=1 $env:VSTEST_TRACE_BUILD=1 # install a stage0 -$dotnetInstallPath = Join-Path $RepoRoot "scripts\obtain\dotnet-install.ps1" - -Write-Output "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" -Invoke-Expression "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" -if ($LastExitCode -ne 0) -{ - Write-Output "The .NET CLI installation failed with exit code $LastExitCode" - exit $LastExitCode -} +cp -r $env:DOTNET_TOOL_DIR $env:DOTNET_INSTALL_DIR # 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 0dce787e9..4d1959cf0 100755 --- a/run-build.sh +++ b/run-build.sh @@ -150,13 +150,7 @@ export VSTEST_TRACE_BUILD=1 export DOTNET_MULTILEVEL_LOOKUP=0 # Install a stage 0 -(set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "release/2.0.0" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS) - -EXIT_CODE=$? -if [ $EXIT_CODE != 0 ]; then - echo "run-build: Error: installing stage0 with exit code $EXIT_CODE." >&2 - exit $EXIT_CODE -fi +cp -r $DOTNET_TOOL_DIR/* $DOTNET_INSTALL_DIR/ # Put stage 0 on the PATH (for this shell only) PATH="$DOTNET_INSTALL_DIR:$PATH" From 218b887d87f268b3b06a6a5d6b83ea79c349248b Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Tue, 17 Oct 2017 08:10:22 -0700 Subject: [PATCH 27/40] Download stage0 when DOTNET_TOOL_DIR is not set --- .../update-dependencies/update-dependencies.ps1 | 12 +++++++++++- .../update-dependencies/update-dependencies.sh | 13 ++++++++++++- run-build.ps1 | 17 ++++++++++++++++- run-build.sh | 13 ++++++++++++- 4 files changed, 51 insertions(+), 4 deletions(-) diff --git a/build_projects/update-dependencies/update-dependencies.ps1 b/build_projects/update-dependencies/update-dependencies.ps1 index e6422b1b2..4c70b197b 100644 --- a/build_projects/update-dependencies/update-dependencies.ps1 +++ b/build_projects/update-dependencies/update-dependencies.ps1 @@ -35,7 +35,17 @@ if (!$env:DOTNET_INSTALL_DIR) } # Install a stage 0 -cp -r $env:DOTNET_TOOL_DIR $env:DOTNET_INSTALL_DIR + Write-Output "Installing .NET Core CLI Stage 0" + +if (!$env:DOTNET_TOOL_DIR) +{ + & "$RepoRoot\scripts\obtain\dotnet-install.ps1" -Channel "master" -Architecture $Architecture + if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" } +} +else +{ + cp -r $env:DOTNET_TOOL_DIR $env:DOTNET_INSTALL_DIR +} # Put the stage0 on the path $env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH" diff --git a/build_projects/update-dependencies/update-dependencies.sh b/build_projects/update-dependencies/update-dependencies.sh index 8a0d7f940..fadffe928 100755 --- a/build_projects/update-dependencies/update-dependencies.sh +++ b/build_projects/update-dependencies/update-dependencies.sh @@ -33,8 +33,19 @@ fi if [ ! -d "$DOTNET_INSTALL_DIR" ]; then mkdir -p $DOTNET_INSTALL_DIR fi +# Install a stage 0 +echo "Installing .NET Core CLI Stage 0" -cp -r $DOTNET_TOOL_DIR/* $DOTNET_INSTALL_DIR/ +if [ -z "$DOTNET_TOOL_DIR" ]; then + $REPO_ROOT/scripts/obtain/dotnet-install.sh -Channel master -Architecture x64 + + if [ $? -ne 0 ]; then + echo "Failed to install stage 0" + exit 1 + fi +else + cp -r $DOTNET_TOOL_DIR/* $DOTNET_INSTALL_DIR/ +fi # Put the stage 0 on the path export PATH=$DOTNET_INSTALL_DIR:$PATH diff --git a/run-build.ps1 b/run-build.ps1 index ea5df284b..b0b04dbff 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -66,7 +66,22 @@ $env:VSTEST_BUILD_TRACE=1 $env:VSTEST_TRACE_BUILD=1 # install a stage0 -cp -r $env:DOTNET_TOOL_DIR $env:DOTNET_INSTALL_DIR +if (!$env:DOTNET_TOOL_DIR) +{ + $dotnetInstallPath = Join-Path $RepoRoot "scripts\obtain\dotnet-install.ps1" + + Write-Output "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" + Invoke-Expression "$dotnetInstallPath -Channel ""release/2.0.0"" -InstallDir $env:DOTNET_INSTALL_DIR -Architecture ""$Architecture""" + if ($LastExitCode -ne 0) + { + Write-Output "The .NET CLI installation failed with exit code $LastExitCode" + exit $LastExitCode + } +} +else +{ + cp -r $env:DOTNET_TOOL_DIR $env:DOTNET_INSTALL_DIR +} # 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 4d1959cf0..f4e7a90ed 100755 --- a/run-build.sh +++ b/run-build.sh @@ -150,7 +150,18 @@ export VSTEST_TRACE_BUILD=1 export DOTNET_MULTILEVEL_LOOKUP=0 # Install a stage 0 -cp -r $DOTNET_TOOL_DIR/* $DOTNET_INSTALL_DIR/ +if [ -z "$DOTNET_TOOL_DIR" ]; then + (set -x ; "$REPOROOT/scripts/obtain/dotnet-install.sh" --channel "release/2.0.0" --install-dir "$DOTNET_INSTALL_DIR" --architecture "$ARCHITECTURE" $LINUX_PORTABLE_INSTALL_ARGS) + + EXIT_CODE=$? + if [ $EXIT_CODE != 0 ]; then + echo "run-build: Error: installing stage0 with exit code $EXIT_CODE." >&2 + exit $EXIT_CODE + fi +else + cp -r $DOTNET_TOOL_DIR/* $DOTNET_INSTALL_DIR/ +fi + # Put stage 0 on the PATH (for this shell only) PATH="$DOTNET_INSTALL_DIR:$PATH" From 16ec23f86b1a32083868e20b097b1f7632111bf8 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Wed, 24 May 2017 17:28:07 -0700 Subject: [PATCH 28/40] Provide a way to explicitly set commit count and sha --- build/GitCommitInfo.targets | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/GitCommitInfo.targets b/build/GitCommitInfo.targets index 6ac729e50..a81e1a7f3 100644 --- a/build/GitCommitInfo.targets +++ b/build/GitCommitInfo.targets @@ -1,12 +1,14 @@ + ConsoleToMSBuild="true" + Condition="'$(GitInfoCommitCount)' == ''"> + ConsoleToMSBuild="true" + Condition="'$(GitInfoCommitHash)' == ''"> From ce7d434ae89427d1070e8dcaf499dd7ca1bed8dc Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Fri, 9 Jun 2017 16:53:50 -0700 Subject: [PATCH 29/40] Remove some unneeded package references --- build_projects/dotnet-cli-build/dotnet-cli-build.csproj | 9 --------- .../shared-build-targets-utils.csproj | 2 -- 2 files changed, 11 deletions(-) diff --git a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj index 2b6c115d8..1dde3cee3 100644 --- a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj +++ b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj @@ -15,19 +15,10 @@ - - - - - - - - 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 ed7002589..042a5fe8a 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 @@ -13,8 +13,6 @@ - - From 62224b34359d653cf5c14b790f5cfc30cd52baf3 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Tue, 17 Oct 2017 08:27:37 -0700 Subject: [PATCH 30/40] Add back NuGet.Protocol dependency --- build_projects/dotnet-cli-build/dotnet-cli-build.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj index 1dde3cee3..a21e6b05f 100644 --- a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj +++ b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj @@ -18,6 +18,7 @@ + From b63fb1aaf8646e15769d5c72144be887202b269a Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Fri, 9 Jun 2017 17:01:01 -0700 Subject: [PATCH 31/40] Remove Azure dependency from build --- ...icrosoft.DotNet.Cli.Build.Framework.csproj | 2 +- .../Publishing/AzurePublisher.cs | 166 ++---------------- .../shared-build-targets-utils.csproj | 4 +- 3 files changed, 19 insertions(+), 153 deletions(-) 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 fefc8affe..ea3d8e435 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 @@ -12,7 +12,7 @@ - + diff --git a/build_projects/shared-build-targets-utils/Publishing/AzurePublisher.cs b/build_projects/shared-build-targets-utils/Publishing/AzurePublisher.cs index 1f1047644..6b0400faa 100644 --- a/build_projects/shared-build-targets-utils/Publishing/AzurePublisher.cs +++ b/build_projects/shared-build-targets-utils/Publishing/AzurePublisher.cs @@ -9,9 +9,6 @@ using System.Linq; using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Microsoft.WindowsAzure.Storage; -using Microsoft.WindowsAzure.Storage.Auth; -using Microsoft.WindowsAzure.Storage.Blob; namespace Microsoft.DotNet.Cli.Build { @@ -25,113 +22,44 @@ namespace Microsoft.DotNet.Cli.Build Sdk, } - private const string s_dotnetBlobContainerName = "dotnet"; - - private string _connectionString { get; set; } - private string _containerName { get; set; } - private CloudBlobContainer _blobContainer { get; set; } - - public AzurePublisher(string containerName = s_dotnetBlobContainerName) + public AzurePublisher(string containerName) { - _connectionString = EnvVars.EnsureVariable("CONNECTION_STRING").Trim('"'); - _containerName = containerName; - _blobContainer = GetDotnetBlobContainer(_connectionString, containerName); + throw new NotImplementedException(); } - public AzurePublisher(string accountName, string accountKey, string containerName = s_dotnetBlobContainerName) + public AzurePublisher(string accountName, string accountKey, string containerName) { - _containerName = containerName; - _blobContainer = GetDotnetBlobContainer(accountName, accountKey, containerName); - } - - private CloudBlobContainer GetDotnetBlobContainer(string connectionString, string containerName) - { - CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString); - - return GetDotnetBlobContainer(storageAccount, containerName); - } - - private CloudBlobContainer GetDotnetBlobContainer(string accountName, string accountKey, string containerName) - { - var storageCredentials = new StorageCredentials(accountName, accountKey); - var storageAccount = new CloudStorageAccount(storageCredentials, true); - return GetDotnetBlobContainer(storageAccount, containerName); - } - - private CloudBlobContainer GetDotnetBlobContainer(CloudStorageAccount storageAccount, string containerName) - { - CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); - - return blobClient.GetContainerReference(containerName); + throw new NotImplementedException(); } public string UploadFile(string file, Product product, string version) { - string url = CalculateRelativePathForFile(file, product, version); - CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(url); - blob.UploadFromFileAsync(file).Wait(); - SetBlobPropertiesBasedOnFileType(blob); - return url; + throw new NotImplementedException(); } public void PublishStringToBlob(string blob, string content) { - CloudBlockBlob blockBlob = _blobContainer.GetBlockBlobReference(blob); - blockBlob.UploadTextAsync(content).Wait(); - - SetBlobPropertiesBasedOnFileType(blockBlob); + throw new NotImplementedException(); } public void CopyBlob(string sourceBlob, string targetBlob) { - CloudBlockBlob source = _blobContainer.GetBlockBlobReference(sourceBlob); - CloudBlockBlob target = _blobContainer.GetBlockBlobReference(targetBlob); - - // Create the empty blob - using (MemoryStream ms = new MemoryStream()) - { - target.UploadFromStreamAsync(ms).Wait(); - } - - // Copy actual blob data - target.StartCopyAsync(source).Wait(); + throw new NotImplementedException(); } public void SetBlobPropertiesBasedOnFileType(string path) { - CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(path); - SetBlobPropertiesBasedOnFileType(blob); - } - - private void SetBlobPropertiesBasedOnFileType(CloudBlockBlob blockBlob) - { - if (Path.GetExtension(blockBlob.Uri.AbsolutePath.ToLower()) == ".svg") - { - blockBlob.Properties.ContentType = "image/svg+xml"; - blockBlob.Properties.CacheControl = "no-cache"; - blockBlob.SetPropertiesAsync().Wait(); - } - else if (Path.GetExtension(blockBlob.Uri.AbsolutePath.ToLower()) == ".version") - { - blockBlob.Properties.ContentType = "text/plain"; - blockBlob.Properties.CacheControl = "no-cache"; - blockBlob.SetPropertiesAsync().Wait(); - } + throw new NotImplementedException(); } public IEnumerable ListBlobs(Product product, string version) { - string virtualDirectory = $"{product}/{version}"; - return ListBlobs(virtualDirectory); + throw new NotImplementedException(); } public IEnumerable ListBlobs(string virtualDirectory) { - CloudBlobDirectory blobDir = _blobContainer.GetDirectoryReference(virtualDirectory); - BlobContinuationToken continuationToken = new BlobContinuationToken(); - - var blobFiles = blobDir.ListBlobsSegmentedAsync(continuationToken).Result; - return blobFiles.Results.Select(bf => bf.Uri.PathAndQuery.Replace($"/{_containerName}/", string.Empty)); + throw new NotImplementedException(); } public string AcquireLeaseOnBlob( @@ -139,94 +67,32 @@ namespace Microsoft.DotNet.Cli.Build TimeSpan? maxWaitDefault = null, TimeSpan? delayDefault = null) { - TimeSpan maxWait = maxWaitDefault ?? TimeSpan.FromSeconds(120); - TimeSpan delay = delayDefault ?? TimeSpan.FromMilliseconds(500); - - Stopwatch stopWatch = new Stopwatch(); - stopWatch.Start(); - - // This will throw an exception with HTTP code 409 when we cannot acquire the lease - // But we should block until we can get this lease, with a timeout (maxWaitSeconds) - while (stopWatch.ElapsedMilliseconds < maxWait.TotalMilliseconds) - { - try - { - CloudBlockBlob cloudBlob = _blobContainer.GetBlockBlobReference(blob); - Task task = cloudBlob.AcquireLeaseAsync(TimeSpan.FromMinutes(1), null); - task.Wait(); - return task.Result; - } - catch (Exception e) - { - Console.WriteLine($"Retrying lease acquisition on {blob}, {e.Message}"); - Thread.Sleep(delay); - } - } - - throw new Exception($"Unable to acquire lease on {blob}"); + throw new NotImplementedException(); } public void ReleaseLeaseOnBlob(string blob, string leaseId) { - CloudBlockBlob cloudBlob = _blobContainer.GetBlockBlobReference(blob); - AccessCondition ac = new AccessCondition() { LeaseId = leaseId }; - cloudBlob.ReleaseLeaseAsync(ac).Wait(); + throw new NotImplementedException(); } public bool IsLatestSpecifiedVersion(string version) { - Task task = _blobContainer.GetBlockBlobReference(version).ExistsAsync(); - task.Wait(); - return task.Result; + throw new NotImplementedException(); } public void DropLatestSpecifiedVersion(string version) { - CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(version); - using (MemoryStream ms = new MemoryStream()) - { - blob.UploadFromStreamAsync(ms).Wait(); - } + throw new NotImplementedException(); } public void CreateBlobIfNotExists(string path) { - Task task = _blobContainer.GetBlockBlobReference(path).ExistsAsync(); - task.Wait(); - if (!task.Result) - { - CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(path); - using (MemoryStream ms = new MemoryStream()) - { - blob.UploadFromStreamAsync(ms).Wait(); - } - } + throw new NotImplementedException(); } public bool TryDeleteBlob(string path) { - try - { - DeleteBlob(path); - - return true; - } - catch (Exception e) - { - Console.WriteLine($"Deleting blob {path} failed with \r\n{e.Message}"); - - return false; - } - } - - private void DeleteBlob(string path) - { - _blobContainer.GetBlockBlobReference(path).DeleteAsync().Wait(); - } - - private static string CalculateRelativePathForFile(string file, Product product, string version) - { - return $"{product}/{version}/{Path.GetFileName(file)}"; + throw new NotImplementedException(); } } } 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 042a5fe8a..614b438f1 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 @@ -12,13 +12,13 @@ + - - + From 5a1021ac4bd97c61a7584c1b8279f34e7a352ce3 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Tue, 17 Oct 2017 10:34:32 -0700 Subject: [PATCH 32/40] Only remove Azure dependency for source builds --- build/BuildDefaults.props | 2 + .../CheckIfAllBuildsHavePublished.cs | 4 + .../dotnet-cli-build/CopyBlobsToLatest.cs | 2 + .../SetBlobPropertiesBasedOnFileTypeTask.cs | 4 + .../Publishing/AzurePublisher.cs | 168 ++++++++++++++++-- .../shared-build-targets-utils.csproj | 1 + 6 files changed, 165 insertions(+), 16 deletions(-) diff --git a/build/BuildDefaults.props b/build/BuildDefaults.props index 60977b327..fc76770a0 100644 --- a/build/BuildDefaults.props +++ b/build/BuildDefaults.props @@ -18,5 +18,7 @@ NU1701 true + + $(DefineConstants);SOURCE_BUILD diff --git a/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs b/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs index 1dfb0b3de..090a128be 100644 --- a/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs +++ b/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs @@ -1,6 +1,8 @@ // 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. +#if !SOURCE_BUILD + using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using System; @@ -84,3 +86,5 @@ namespace Microsoft.DotNet.Cli.Build } } } + +#endif diff --git a/build_projects/dotnet-cli-build/CopyBlobsToLatest.cs b/build_projects/dotnet-cli-build/CopyBlobsToLatest.cs index 3078a2b39..1adab0114 100644 --- a/build_projects/dotnet-cli-build/CopyBlobsToLatest.cs +++ b/build_projects/dotnet-cli-build/CopyBlobsToLatest.cs @@ -1,6 +1,7 @@ // 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. +#if !SOURCE_BUILD using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using System.IO; @@ -112,3 +113,4 @@ namespace Microsoft.DotNet.Cli.Build } } } +#endif diff --git a/build_projects/dotnet-cli-build/SetBlobPropertiesBasedOnFileTypeTask.cs b/build_projects/dotnet-cli-build/SetBlobPropertiesBasedOnFileTypeTask.cs index d4caddc04..6a7c8d446 100644 --- a/build_projects/dotnet-cli-build/SetBlobPropertiesBasedOnFileTypeTask.cs +++ b/build_projects/dotnet-cli-build/SetBlobPropertiesBasedOnFileTypeTask.cs @@ -1,6 +1,8 @@ // 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. +#if !SOURCE_BUILD + using System; using System.Collections.Generic; using System.IO; @@ -65,3 +67,5 @@ namespace Microsoft.DotNet.Cli.Build } } } + +#endif \ No newline at end of file diff --git a/build_projects/shared-build-targets-utils/Publishing/AzurePublisher.cs b/build_projects/shared-build-targets-utils/Publishing/AzurePublisher.cs index 6b0400faa..5d77dfc76 100644 --- a/build_projects/shared-build-targets-utils/Publishing/AzurePublisher.cs +++ b/build_projects/shared-build-targets-utils/Publishing/AzurePublisher.cs @@ -1,6 +1,7 @@ // 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. +#if !SOURCE_BUILD using System; using System.Collections.Generic; using System.Diagnostics; @@ -9,6 +10,9 @@ using System.Linq; using System.Net.Http; using System.Threading; using System.Threading.Tasks; +using Microsoft.WindowsAzure.Storage; +using Microsoft.WindowsAzure.Storage.Auth; +using Microsoft.WindowsAzure.Storage.Blob; namespace Microsoft.DotNet.Cli.Build { @@ -22,44 +26,113 @@ namespace Microsoft.DotNet.Cli.Build Sdk, } - public AzurePublisher(string containerName) + private const string s_dotnetBlobContainerName = "dotnet"; + + private string _connectionString { get; set; } + private string _containerName { get; set; } + private CloudBlobContainer _blobContainer { get; set; } + + public AzurePublisher(string containerName = s_dotnetBlobContainerName) { - throw new NotImplementedException(); + _connectionString = EnvVars.EnsureVariable("CONNECTION_STRING").Trim('"'); + _containerName = containerName; + _blobContainer = GetDotnetBlobContainer(_connectionString, containerName); } - public AzurePublisher(string accountName, string accountKey, string containerName) + public AzurePublisher(string accountName, string accountKey, string containerName = s_dotnetBlobContainerName) { - throw new NotImplementedException(); + _containerName = containerName; + _blobContainer = GetDotnetBlobContainer(accountName, accountKey, containerName); + } + + private CloudBlobContainer GetDotnetBlobContainer(string connectionString, string containerName) + { + CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString); + + return GetDotnetBlobContainer(storageAccount, containerName); + } + + private CloudBlobContainer GetDotnetBlobContainer(string accountName, string accountKey, string containerName) + { + var storageCredentials = new StorageCredentials(accountName, accountKey); + var storageAccount = new CloudStorageAccount(storageCredentials, true); + return GetDotnetBlobContainer(storageAccount, containerName); + } + + private CloudBlobContainer GetDotnetBlobContainer(CloudStorageAccount storageAccount, string containerName) + { + CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); + + return blobClient.GetContainerReference(containerName); } public string UploadFile(string file, Product product, string version) { - throw new NotImplementedException(); + string url = CalculateRelativePathForFile(file, product, version); + CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(url); + blob.UploadFromFileAsync(file).Wait(); + SetBlobPropertiesBasedOnFileType(blob); + return url; } public void PublishStringToBlob(string blob, string content) { - throw new NotImplementedException(); + CloudBlockBlob blockBlob = _blobContainer.GetBlockBlobReference(blob); + blockBlob.UploadTextAsync(content).Wait(); + + SetBlobPropertiesBasedOnFileType(blockBlob); } public void CopyBlob(string sourceBlob, string targetBlob) { - throw new NotImplementedException(); + CloudBlockBlob source = _blobContainer.GetBlockBlobReference(sourceBlob); + CloudBlockBlob target = _blobContainer.GetBlockBlobReference(targetBlob); + + // Create the empty blob + using (MemoryStream ms = new MemoryStream()) + { + target.UploadFromStreamAsync(ms).Wait(); + } + + // Copy actual blob data + target.StartCopyAsync(source).Wait(); } public void SetBlobPropertiesBasedOnFileType(string path) { - throw new NotImplementedException(); + CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(path); + SetBlobPropertiesBasedOnFileType(blob); + } + + private void SetBlobPropertiesBasedOnFileType(CloudBlockBlob blockBlob) + { + if (Path.GetExtension(blockBlob.Uri.AbsolutePath.ToLower()) == ".svg") + { + blockBlob.Properties.ContentType = "image/svg+xml"; + blockBlob.Properties.CacheControl = "no-cache"; + blockBlob.SetPropertiesAsync().Wait(); + } + else if (Path.GetExtension(blockBlob.Uri.AbsolutePath.ToLower()) == ".version") + { + blockBlob.Properties.ContentType = "text/plain"; + blockBlob.Properties.CacheControl = "no-cache"; + blockBlob.SetPropertiesAsync().Wait(); + } } public IEnumerable ListBlobs(Product product, string version) { - throw new NotImplementedException(); + string virtualDirectory = $"{product}/{version}"; + return ListBlobs(virtualDirectory); } public IEnumerable ListBlobs(string virtualDirectory) { - throw new NotImplementedException(); + CloudBlobDirectory blobDir = _blobContainer.GetDirectoryReference(virtualDirectory); + BlobContinuationToken continuationToken = new BlobContinuationToken(); + + var blobFiles = blobDir.ListBlobsSegmentedAsync(continuationToken).Result; + return blobFiles.Results.Select(bf => bf.Uri.PathAndQuery.Replace($"/{_containerName}/", string.Empty)); } public string AcquireLeaseOnBlob( @@ -67,32 +140,95 @@ namespace Microsoft.DotNet.Cli.Build TimeSpan? maxWaitDefault = null, TimeSpan? delayDefault = null) { - throw new NotImplementedException(); + TimeSpan maxWait = maxWaitDefault ?? TimeSpan.FromSeconds(120); + TimeSpan delay = delayDefault ?? TimeSpan.FromMilliseconds(500); + + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + + // This will throw an exception with HTTP code 409 when we cannot acquire the lease + // But we should block until we can get this lease, with a timeout (maxWaitSeconds) + while (stopWatch.ElapsedMilliseconds < maxWait.TotalMilliseconds) + { + try + { + CloudBlockBlob cloudBlob = _blobContainer.GetBlockBlobReference(blob); + Task task = cloudBlob.AcquireLeaseAsync(TimeSpan.FromMinutes(1), null); + task.Wait(); + return task.Result; + } + catch (Exception e) + { + Console.WriteLine($"Retrying lease acquisition on {blob}, {e.Message}"); + Thread.Sleep(delay); + } + } + + throw new Exception($"Unable to acquire lease on {blob}"); } public void ReleaseLeaseOnBlob(string blob, string leaseId) { - throw new NotImplementedException(); + CloudBlockBlob cloudBlob = _blobContainer.GetBlockBlobReference(blob); + AccessCondition ac = new AccessCondition() { LeaseId = leaseId }; + cloudBlob.ReleaseLeaseAsync(ac).Wait(); } public bool IsLatestSpecifiedVersion(string version) { - throw new NotImplementedException(); + Task task = _blobContainer.GetBlockBlobReference(version).ExistsAsync(); + task.Wait(); + return task.Result; } public void DropLatestSpecifiedVersion(string version) { - throw new NotImplementedException(); + CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(version); + using (MemoryStream ms = new MemoryStream()) + { + blob.UploadFromStreamAsync(ms).Wait(); + } } public void CreateBlobIfNotExists(string path) { - throw new NotImplementedException(); + Task task = _blobContainer.GetBlockBlobReference(path).ExistsAsync(); + task.Wait(); + if (!task.Result) + { + CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(path); + using (MemoryStream ms = new MemoryStream()) + { + blob.UploadFromStreamAsync(ms).Wait(); + } + } } public bool TryDeleteBlob(string path) { - throw new NotImplementedException(); + try + { + DeleteBlob(path); + + return true; + } + catch (Exception e) + { + Console.WriteLine($"Deleting blob {path} failed with \r\n{e.Message}"); + + return false; + } + } + + private void DeleteBlob(string path) + { + _blobContainer.GetBlockBlobReference(path).DeleteAsync().Wait(); + } + + private static string CalculateRelativePathForFile(string file, Product product, string version) + { + return $"{product}/{version}/{Path.GetFileName(file)}"; } } } +#endif \ No newline at end of file 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 614b438f1..252e89bb6 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 @@ -18,6 +18,7 @@ + From 26d8d75fef88465d81d0bd1134ab10a89adc0231 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Tue, 17 Oct 2017 10:43:50 -0700 Subject: [PATCH 33/40] Use stable System.Reflection.Metadata --- 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 a21e6b05f..35ca73f22 100644 --- a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj +++ b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj @@ -15,7 +15,7 @@ - + From c9eeef1790a39b328442e2f2abb982255c3429ea Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Tue, 17 Oct 2017 10:47:27 -0700 Subject: [PATCH 34/40] Remove dependency on VersionTools in source builds --- build_projects/dotnet-cli-build/UpdateVersionsRepo.cs | 7 ++++++- build_projects/dotnet-cli-build/dotnet-cli-build.csproj | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build_projects/dotnet-cli-build/UpdateVersionsRepo.cs b/build_projects/dotnet-cli-build/UpdateVersionsRepo.cs index f528e05ad..584cc0b11 100644 --- a/build_projects/dotnet-cli-build/UpdateVersionsRepo.cs +++ b/build_projects/dotnet-cli-build/UpdateVersionsRepo.cs @@ -3,9 +3,12 @@ using Microsoft.Build.Framework; using Microsoft.Build.Utilities; -using Microsoft.DotNet.VersionTools.Automation; using System.IO; +#if !SOURCE_BUILD +using Microsoft.DotNet.VersionTools.Automation; +#endif + namespace Microsoft.DotNet.Cli.Build { public class UpdateVersionsRepo : Task @@ -21,6 +24,7 @@ namespace Microsoft.DotNet.Cli.Build public override bool Execute() { +#if !SOURCE_BUILD string versionsRepoPath = $"build-info/dotnet/cli/{BranchName}"; GitHubAuth auth = new GitHubAuth(GitHubPassword); @@ -28,6 +32,7 @@ namespace Microsoft.DotNet.Cli.Build repoUpdater.UpdateBuildInfoAsync( Directory.GetFiles(PackagesDirectory, "*.nupkg"), versionsRepoPath).Wait(); +#endif return true; } diff --git a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj index 35ca73f22..f76765aff 100644 --- a/build_projects/dotnet-cli-build/dotnet-cli-build.csproj +++ b/build_projects/dotnet-cli-build/dotnet-cli-build.csproj @@ -21,6 +21,6 @@ - + From 57d256dbf5a10e8296820fbac074ff73e29bdd51 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Tue, 17 Oct 2017 14:32:36 -0700 Subject: [PATCH 35/40] Make copy idempotent --- build_projects/update-dependencies/update-dependencies.ps1 | 2 +- run-build.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build_projects/update-dependencies/update-dependencies.ps1 b/build_projects/update-dependencies/update-dependencies.ps1 index 4c70b197b..3f79992a3 100644 --- a/build_projects/update-dependencies/update-dependencies.ps1 +++ b/build_projects/update-dependencies/update-dependencies.ps1 @@ -44,7 +44,7 @@ if (!$env:DOTNET_TOOL_DIR) } else { - cp -r $env:DOTNET_TOOL_DIR $env:DOTNET_INSTALL_DIR + Copy-Item -Force -Recurse $env:DOTNET_TOOL_DIR $env:DOTNET_INSTALL_DIR } # Put the stage0 on the path diff --git a/run-build.ps1 b/run-build.ps1 index b0b04dbff..b3caef1e1 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -80,7 +80,7 @@ if (!$env:DOTNET_TOOL_DIR) } else { - cp -r $env:DOTNET_TOOL_DIR $env:DOTNET_INSTALL_DIR + Copy-Item -Recurse -Force $env:DOTNET_TOOL_DIR $env:DOTNET_INSTALL_DIR } # Put the stage0 on the path From 12931ba3200f3e963504da92609e1afd42e47d5f Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Wed, 6 Sep 2017 15:27:16 -0500 Subject: [PATCH 36/40] Fix update-dependencies. Don't import the root Directory.Build.props during update-dependencies because it imports generated .props files that don't exist outside of the build. (cherry picked from commit 0491fd3826a9474f7db9cd89589edf53dbc280ae) --- .../update-dependencies/Directory.Build.props | 8 ++++++++ .../update-dependencies/update-dependencies.ps1 | 7 ++----- .../update-dependencies/update-dependencies.sh | 10 ++-------- 3 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 build_projects/update-dependencies/Directory.Build.props diff --git a/build_projects/update-dependencies/Directory.Build.props b/build_projects/update-dependencies/Directory.Build.props new file mode 100644 index 000000000..a8d332ca6 --- /dev/null +++ b/build_projects/update-dependencies/Directory.Build.props @@ -0,0 +1,8 @@ + + + + + diff --git a/build_projects/update-dependencies/update-dependencies.ps1 b/build_projects/update-dependencies/update-dependencies.ps1 index 3f79992a3..ed5411110 100644 --- a/build_projects/update-dependencies/update-dependencies.ps1 +++ b/build_projects/update-dependencies/update-dependencies.ps1 @@ -34,6 +34,8 @@ if (!$env:DOTNET_INSTALL_DIR) $env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\$Architecture" } +$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 + # Install a stage 0 Write-Output "Installing .NET Core CLI Stage 0" @@ -50,11 +52,6 @@ else # Put the stage0 on the path $env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH" -# Restore the app -Write-Output "Restoring $ProjectPath..." -dotnet restore "$ProjectPath" -if($LASTEXITCODE -ne 0) { throw "Failed to restore" } - # Run the app Write-Output "Invoking App $ProjectPath..." dotnet run -p "$ProjectPath" "$ProjectArgs" diff --git a/build_projects/update-dependencies/update-dependencies.sh b/build_projects/update-dependencies/update-dependencies.sh index fadffe928..ff95d79a6 100755 --- a/build_projects/update-dependencies/update-dependencies.sh +++ b/build_projects/update-dependencies/update-dependencies.sh @@ -30,6 +30,8 @@ if [ -z "${DOTNET_INSTALL_DIR:-}" ]; then export DOTNET_INSTALL_DIR=$REPO_ROOT/.dotnet_stage0/x64 fi +export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 + if [ ! -d "$DOTNET_INSTALL_DIR" ]; then mkdir -p $DOTNET_INSTALL_DIR fi @@ -50,14 +52,6 @@ fi # Put the stage 0 on the path export PATH=$DOTNET_INSTALL_DIR:$PATH -echo "Restoring $PROJECT_PATH..." -dotnet restore "$PROJECT_PATH" - -if [ $? -ne 0 ]; then - echo "Failed to restore" - exit 1 -fi - echo "Invoking App $PROJECT_PATH..." dotnet run -p "$PROJECT_PATH" $@ From aea3f64ab26726dc9fa65dfdce366bcd39fc5bfe Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Sat, 7 Oct 2017 22:04:43 -0500 Subject: [PATCH 37/40] Enable CLI to build on Windows during source-build. Don't build for net46 and use correct RID for core-setup. --- build/BundledRuntimes.props | 2 +- .../Microsoft.DotNet.Cli.Utils.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/BundledRuntimes.props b/build/BundledRuntimes.props index 43af1746e..8e0b2eca7 100644 --- a/build/BundledRuntimes.props +++ b/build/BundledRuntimes.props @@ -1,7 +1,7 @@ $(HostRid) - $(HostMonikerRid) + $(HostMonikerRid) -internal 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 a1dd1e22f..dc4ff23d6 100644 --- a/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj +++ b/src/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj @@ -3,7 +3,7 @@ $(SdkVersion) netstandard1.5;net46 - netstandard1.5 + netstandard1.5 true ../../tools/Key.snk true From a7aeab79d8a971e99d8b2678985abe7dc01dca80 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Wed, 18 Oct 2017 12:17:03 -0700 Subject: [PATCH 38/40] Fix problems with excluding MSBuildSdkResolver from build --- build/Compile.targets | 2 +- build/Prepare.targets | 4 ++-- build/package/Nupkg.targets | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/Compile.targets b/build/Compile.targets index 044c10303..1369ad7d5 100644 --- a/build/Compile.targets +++ b/build/Compile.targets @@ -15,7 +15,7 @@ + Condition="'$(IncludeMSBuildSdkResolver)' == 'true'" /> - - + + diff --git a/build/package/Nupkg.targets b/build/package/Nupkg.targets index d7287c8b7..07b7524cc 100644 --- a/build/package/Nupkg.targets +++ b/build/package/Nupkg.targets @@ -11,7 +11,7 @@ Microsoft.DotNet.Cli.Utils $(SdkNugetVersion) - + Microsoft.DotNet.MSBuildSdkResolver $(SdkNugetVersion) From 2cdfe936f402b049671915e58550f129a54135b3 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Wed, 18 Oct 2017 12:32:36 -0700 Subject: [PATCH 39/40] Eliminate downgrade errors --- src/tool_fsharp/tool_fsc.csproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tool_fsharp/tool_fsc.csproj b/src/tool_fsharp/tool_fsc.csproj index 1ec0f52b5..729c2bdb4 100644 --- a/src/tool_fsharp/tool_fsc.csproj +++ b/src/tool_fsharp/tool_fsc.csproj @@ -13,6 +13,8 @@ + + From b18db615946288f2f9028dfe333d775b7f180598 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Thu, 19 Oct 2017 11:00:13 -0700 Subject: [PATCH 40/40] ifdef out entire update versions task in source build --- build_projects/dotnet-cli-build/UpdateVersionsRepo.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build_projects/dotnet-cli-build/UpdateVersionsRepo.cs b/build_projects/dotnet-cli-build/UpdateVersionsRepo.cs index 584cc0b11..615a2e5ca 100644 --- a/build_projects/dotnet-cli-build/UpdateVersionsRepo.cs +++ b/build_projects/dotnet-cli-build/UpdateVersionsRepo.cs @@ -1,13 +1,12 @@ // 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. +#if !SOURCE_BUILD using Microsoft.Build.Framework; using Microsoft.Build.Utilities; +using Microsoft.DotNet.VersionTools.Automation; using System.IO; -#if !SOURCE_BUILD -using Microsoft.DotNet.VersionTools.Automation; -#endif namespace Microsoft.DotNet.Cli.Build { @@ -24,7 +23,6 @@ namespace Microsoft.DotNet.Cli.Build public override bool Execute() { -#if !SOURCE_BUILD string versionsRepoPath = $"build-info/dotnet/cli/{BranchName}"; GitHubAuth auth = new GitHubAuth(GitHubPassword); @@ -32,9 +30,9 @@ namespace Microsoft.DotNet.Cli.Build repoUpdater.UpdateBuildInfoAsync( Directory.GetFiles(PackagesDirectory, "*.nupkg"), versionsRepoPath).Wait(); -#endif return true; } } } +#endif