diff --git a/.vsts-ci.yml b/.vsts-ci.yml index b28494424..5e2cdc745 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -334,10 +334,11 @@ stages: - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-create-tarball.yml - - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: - - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml - parameters: - dependsOn: Source_Build_Create_Tarball + # For .NET 7.0, source-build currently supports 7.0.1xx. Disable tarball build validation in all other branches. + # - ${{ if in(variables['Build.Reason'], 'PullRequest') }}: + # - template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml + # parameters: + # dependsOn: Source_Build_Create_Tarball # https://github.com/dotnet/core-sdk/issues/248 # - template: /eng/build.yml diff --git a/NuGet.config b/NuGet.config index 637dd025e..d288f50a2 100644 --- a/NuGet.config +++ b/NuGet.config @@ -6,23 +6,18 @@ + + + - - - - - - - - @@ -44,15 +39,11 @@ - - - - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index f9c9d8f5a..73ed55f61 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -85,35 +85,35 @@ https://github.com/dotnet/test-templates 0385265f4d0b6413d64aea0223172366a9b9858c - + https://github.com/dotnet/test-templates - aaaa0c1826f97a9dfcc67e94136bf01010b55f23 + 45a41b353d078e4d1e5918246fddbacb452eb210 - + https://github.com/dotnet/test-templates - aaaa0c1826f97a9dfcc67e94136bf01010b55f23 + 45a41b353d078e4d1e5918246fddbacb452eb210 - + https://github.com/dotnet/test-templates - aaaa0c1826f97a9dfcc67e94136bf01010b55f23 + 45a41b353d078e4d1e5918246fddbacb452eb210 - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - c0aa76c865eb72b183247119752dfabca811f17a + a87e751ac0a46a6a69fb55a63a8f96a71ecace7c - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - c0aa76c865eb72b183247119752dfabca811f17a + a87e751ac0a46a6a69fb55a63a8f96a71ecace7c - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - c0aa76c865eb72b183247119752dfabca811f17a + a87e751ac0a46a6a69fb55a63a8f96a71ecace7c - + https://dev.azure.com/dnceng/internal/_git/dotnet-sdk - c0aa76c865eb72b183247119752dfabca811f17a + a87e751ac0a46a6a69fb55a63a8f96a71ecace7c @@ -124,39 +124,43 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-wpf 02d7f45dcacc192b40e725d6f6e77ec64e202c7a - + https://github.com/dotnet/fsharp - 1d892dd78d5dcb261a1d26f72efb333834436a02 + 5b37dd5fea143baefbef2bd83836188af0815a30 - + https://github.com/dotnet/fsharp - 1d892dd78d5dcb261a1d26f72efb333834436a02 + 5b37dd5fea143baefbef2bd83836188af0815a30 - + https://github.com/microsoft/vstest - 79d56b02b69a582cd90428878a5e9411ab7538f5 + e7ea853f64af5a4c240acaf9e54cdae3ae0eb7bb - + https://github.com/dotnet/linker - 19fa656d35252ccf926e6a6d783b16a2f094aaef + 53b3303c57b3fe659500fb362a0eef12991c1197 linker - + https://github.com/dotnet/roslyn - 528676cdbf0bfcfdb9372dc57a047dd0edc6d4db + 5db000294db8cc634e7d8fc004844338c9747dbc - + https://github.com/dotnet/msbuild - 6918b863aa37ad0699f98482fbab9f7a52e65a92 - + 2679cf5a9cbd13e6833ca8a59553716f3f2f2afa - + + https://github.com/dotnet/msbuild + 2679cf5a9cbd13e6833ca8a59553716f3f2f2afa + + + https://dev.azure.com/devdiv/DevDiv/_git/NuGet-NuGet.Client-Trusted - 24f8150c97f9d26a7b5d77e983938e18d48e7d9f + a36edf3a2bf891d6aabfc83cc0b21d24a870ea1a @@ -186,26 +190,20 @@ 7b9791daa3a3477eb22ec805946c9fff8b42d8ca - - - https://github.com/dotnet/format - 6a22157622e5da71ba0c43d23269352210bdb277 - - - + https://github.com/dotnet/arcade - 02d5538bac1bacfd6fb310d92ab8914de08f3358 + feda715e3fb6d511eaa39071bb9d77351cf4d943 - + https://github.com/dotnet/arcade - 02d5538bac1bacfd6fb310d92ab8914de08f3358 + feda715e3fb6d511eaa39071bb9d77351cf4d943 - + https://github.com/dotnet/arcade - 02d5538bac1bacfd6fb310d92ab8914de08f3358 + feda715e3fb6d511eaa39071bb9d77351cf4d943 https://github.com/dotnet/source-build-reference-packages diff --git a/eng/Versions.props b/eng/Versions.props index 0e762a39b..a33535c6d 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -7,8 +7,8 @@ 7 0 - 1 - 17 + 3 + 14 $(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature) servicing @@ -23,7 +23,7 @@ 30 32 17 - $([MSBuild]::Add($(VersionFeature), 11)) + $([MSBuild]::Add($(VersionFeature), 14)) @@ -33,7 +33,7 @@ - 7.0.0-beta.24059.5 + 7.0.0-beta.24065.4 @@ -46,9 +46,9 @@ 1.0.2-beta4.22406.1 - 1.0.2-beta4.22503.2 - 1.0.2-beta4.22503.2 - 1.0.2-beta4.22503.2 + 1.1.0-rc.23213.1 + 1.1.0-rc.23213.1 + 1.1.0-rc.23213.1 @@ -69,13 +69,17 @@ - 7.0.115 - 7.0.115-servicing.23601.25 - 7.0.115-servicing.23601.25 + 7.0.312 + 7.0.312-servicing.23601.26 + 7.0.312-servicing.23601.26 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) + + + 4.6.0-3.23329.3 + 7.0.4 @@ -194,7 +198,7 @@ 2.2.0-beta.19072.10 2.0.0 - 17.4.1-release-20230405-06 + 17.6.3 diff --git a/eng/common/native/init-compiler.sh b/eng/common/native/init-compiler.sh index f13b74080..81ea06151 100644 --- a/eng/common/native/init-compiler.sh +++ b/eng/common/native/init-compiler.sh @@ -71,7 +71,7 @@ if [[ -z "$CLR_CC" ]]; then # Set default versions if [[ -z "$majorVersion" ]]; then # note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero. - if [[ "$compiler" == "clang" ]]; then versions=( 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 ) + if [[ "$compiler" == "clang" ]]; then versions=( 17 16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 ) elif [[ "$compiler" == "gcc" ]]; then versions=( 12 11 10 9 8 7 6 5 4.9 ); fi for version in "${versions[@]}"; do diff --git a/eng/restore-toolset.ps1 b/eng/restore-toolset.ps1 index 94cbcbb6e..893a96111 100644 --- a/eng/restore-toolset.ps1 +++ b/eng/restore-toolset.ps1 @@ -29,6 +29,8 @@ set DOTNET_MULTILEVEL_LOOKUP=0 set PATH=$env:DOTNET_INSTALL_DIR;%PATH% set NUGET_PACKAGES=$env:NUGET_PACKAGES + +set DOTNET_ROOT=$env:DOTNET_INSTALL_DIR "@ Out-File -FilePath $scriptPath -InputObject $scriptContents -Encoding ASCII diff --git a/eng/source-build-tarball-build-official.yml b/eng/source-build-tarball-build-official.yml index eb47706f8..aa1de43eb 100644 --- a/eng/source-build-tarball-build-official.yml +++ b/eng/source-build-tarball-build-official.yml @@ -7,12 +7,16 @@ resources: trigger: branches: include: - - release/6.0.1xx - - internal/release/6.0.1xx* - - internal/release/*/6.0.1xx* - - release/7.0.1xx - - internal/release/7.0.1xx* - - internal/release/*/7.0.1xx* + - main + - release/* + - internal/release/* + exclude: + - release/7.0.2xx + - internal/release/7.0.2xx + - release/7.0.3xx + - internal/release/7.0.3xx + - release/7.0.4xx + - internal/release/7.0.4xx stages: - build diff --git a/global.json b/global.json index fd9164f9a..30aff2051 100644 --- a/global.json +++ b/global.json @@ -11,7 +11,7 @@ "cmake": "3.16.4" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.24059.5", - "Microsoft.DotNet.CMake.Sdk": "7.0.0-beta.24059.5" + "Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.24065.4", + "Microsoft.DotNet.CMake.Sdk": "7.0.0-beta.24065.4" } } diff --git a/src/SourceBuild/tarball/content/repos/aspnetcore.proj b/src/SourceBuild/tarball/content/repos/aspnetcore.proj index cea712c1b..ff9d9fda1 100644 --- a/src/SourceBuild/tarball/content/repos/aspnetcore.proj +++ b/src/SourceBuild/tarball/content/repos/aspnetcore.proj @@ -25,8 +25,12 @@ - CS0618 + Requires https://github.com/dotnet/source-build/issues/2482 + CS8600 - Converting null literal or possible null value to non-nullable type. + Requires https://github.com/dotnet/aspnetcore/issues/45882. + CS8604 - Possible null reference argument for parameter. + Requires https://github.com/dotnet/aspnetcore/issues/45882. --> + CS0618;CA1825;CS8600;CS8604 diff --git a/src/SourceBuild/tarball/content/repos/format.proj b/src/SourceBuild/tarball/content/repos/format.proj index 9b57876c2..22de69468 100644 --- a/src/SourceBuild/tarball/content/repos/format.proj +++ b/src/SourceBuild/tarball/content/repos/format.proj @@ -7,6 +7,7 @@ $(ProjectDirectory)global.json $(ProjectDirectory)NuGet.config false + CS9057 diff --git a/src/SourceBuild/tarball/content/repos/installer.proj b/src/SourceBuild/tarball/content/repos/installer.proj index 3a9756a27..6cbda514b 100644 --- a/src/SourceBuild/tarball/content/repos/installer.proj +++ b/src/SourceBuild/tarball/content/repos/installer.proj @@ -51,6 +51,8 @@ true + + CS9057 diff --git a/src/SourceBuild/tarball/content/repos/known-good.proj b/src/SourceBuild/tarball/content/repos/known-good.proj index 0adee7f53..989d6e20d 100644 --- a/src/SourceBuild/tarball/content/repos/known-good.proj +++ b/src/SourceBuild/tarball/content/repos/known-good.proj @@ -34,7 +34,7 @@ - + diff --git a/src/SourceBuild/tarball/content/repos/nuget-client.proj b/src/SourceBuild/tarball/content/repos/nuget-client.proj index eccc1a738..586565cac 100644 --- a/src/SourceBuild/tarball/content/repos/nuget-client.proj +++ b/src/SourceBuild/tarball/content/repos/nuget-client.proj @@ -6,6 +6,7 @@ false true true + CS9057 diff --git a/src/SourceBuild/tarball/content/repos/razor-compiler.proj b/src/SourceBuild/tarball/content/repos/razor.proj similarity index 100% rename from src/SourceBuild/tarball/content/repos/razor-compiler.proj rename to src/SourceBuild/tarball/content/repos/razor.proj diff --git a/src/SourceBuild/tarball/content/repos/sdk.proj b/src/SourceBuild/tarball/content/repos/sdk.proj index 54e90ec3e..442c548e6 100644 --- a/src/SourceBuild/tarball/content/repos/sdk.proj +++ b/src/SourceBuild/tarball/content/repos/sdk.proj @@ -42,7 +42,7 @@ - + diff --git a/src/SourceBuild/tarball/patches/aspnetcore/0002-IDE0060-workaround.patch b/src/SourceBuild/tarball/patches/aspnetcore/0002-IDE0060-workaround.patch new file mode 100644 index 000000000..62a4f8d31 --- /dev/null +++ b/src/SourceBuild/tarball/patches/aspnetcore/0002-IDE0060-workaround.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MichaelSimons +Date: Fri, 12 Aug 2022 23:02:54 +0000 +Subject: [PATCH] IDE0060 workaround + +Backport: https://github.com/dotnet/roslyn-analyzers/issues/6228 +--- + src/Http/Routing/src/Matching/Ascii.cs | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/Http/Routing/src/Matching/Ascii.cs b/src/Http/Routing/src/Matching/Ascii.cs +index 081af0bb07..393a9eb65f 100644 +--- a/src/Http/Routing/src/Matching/Ascii.cs ++++ b/src/Http/Routing/src/Matching/Ascii.cs +@@ -12,7 +12,6 @@ internal static class Ascii + // and we know that the spans are the same length. + // + // Similar to https://github.com/dotnet/coreclr/blob/master/src/System.Private.CoreLib/shared/System/Globalization/CompareInfo.cs#L549 +- [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool AsciiIgnoreCaseEquals(ReadOnlySpan a, ReadOnlySpan b, int length) + { + // The caller should have checked the length. We enforce that here by THROWING if the diff --git a/src/SourceBuild/tarball/patches/aspnetcore/0003-Address-obsolete-errors.patch b/src/SourceBuild/tarball/patches/aspnetcore/0003-Address-obsolete-errors.patch new file mode 100644 index 000000000..b98759d70 --- /dev/null +++ b/src/SourceBuild/tarball/patches/aspnetcore/0003-Address-obsolete-errors.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MichaelSimons +Date: Thu, 27 Oct 2022 02:47:08 +0000 +Subject: [PATCH] Address obsolete errors + +Backport: https://github.com/dotnet/aspnetcore/pull/44734 +--- + src/Servers/Kestrel/Core/src/KestrelServerOptions.cs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs b/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs +index f31880e891..fc6322dd41 100644 +--- a/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs ++++ b/src/Servers/Kestrel/Core/src/KestrelServerOptions.cs +@@ -252,9 +252,6 @@ public class KestrelServerOptions + writer.WritePropertyName(nameof(AllowResponseHeaderCompression)); + writer.WriteBooleanValue(AllowResponseHeaderCompression); + +- writer.WritePropertyName(nameof(EnableAltSvc)); +- writer.WriteBooleanValue(EnableAltSvc); +- + writer.WritePropertyName(nameof(IsDevCertLoaded)); + writer.WriteBooleanValue(IsDevCertLoaded); + diff --git a/src/SourceBuild/tarball/patches/format/0002-Add-explicit-System.Text.Json-dependency.patch b/src/SourceBuild/tarball/patches/format/0002-Add-explicit-System.Text.Json-dependency.patch deleted file mode 100644 index 65d38d329..000000000 --- a/src/SourceBuild/tarball/patches/format/0002-Add-explicit-System.Text.Json-dependency.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nikola Milosavljevic -Date: Mon, 26 Jun 2023 23:46:46 +0000 -Subject: [PATCH] Add explicit System.Text.Json dependency - -Adding an excplicit System.Text.Json dependency to prevent transitive dependency to be picked up -from PSB, via Microsoft.Build package. - -Backport: https://github.com/dotnet/format/pull/1887 ---- - Directory.Packages.props | 1 + - eng/Version.Details.xml | 4 ++++ - eng/Versions.props | 2 ++ - src/dotnet-format.csproj | 6 ++++++ - 4 files changed, 13 insertions(+) - -diff --git a/Directory.Packages.props b/Directory.Packages.props -index 6b628c22..c9f86593 100644 ---- a/Directory.Packages.props -+++ b/Directory.Packages.props -@@ -36,5 +36,6 @@ - - - -+ - - -\ No newline at end of file -diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml -index cdfa5f5e..86f02b44 100644 ---- a/eng/Version.Details.xml -+++ b/eng/Version.Details.xml -@@ -13,6 +13,10 @@ - https://github.com/dotnet/command-line-api - e5861a73ad3f08c820319b56b302387a8832ed59 - -+ -+ https://github.com/dotnet/runtime -+ 3241df7f2b0f3e2dada8d07229723c79fdbe4991 -+ - - - -diff --git a/eng/Versions.props b/eng/Versions.props -index 27582078..bccaf176 100644 ---- a/eng/Versions.props -+++ b/eng/Versions.props -@@ -20,6 +20,8 @@ - - 2.0.0-beta4.22430.1 - 0.4.0-alpha.22430.1 -+ -+ 6.0.8 - - -+ - - - diff --git a/src/core-sdk-tasks/GenerateMSBuildExtensionsSWR.cs b/src/core-sdk-tasks/GenerateMSBuildExtensionsSWR.cs index 03e407b2e..7ce25b785 100644 --- a/src/core-sdk-tasks/GenerateMSBuildExtensionsSWR.cs +++ b/src/core-sdk-tasks/GenerateMSBuildExtensionsSWR.cs @@ -53,7 +53,7 @@ namespace Microsoft.DotNet.Cli.Build foreach (var file in files) { - sb.Append(@" file source=""!(bindpath.sources)\Redist\Common\NetCoreSDK\MSBuildExtensions\"); + sb.Append(@" file source=""$(PkgVS_Redist_Common_Net_Core_SDK_MSBuildExtensions)\"); sb.Append(Path.Combine(relativeSourcePath, Path.GetFileName(file))); sb.AppendLine("\""); } diff --git a/src/redist/targets/GenerateBundledVersions.targets b/src/redist/targets/GenerateBundledVersions.targets index 60d7ecde1..ba7c4e305 100644 --- a/src/redist/targets/GenerateBundledVersions.targets +++ b/src/redist/targets/GenerateBundledVersions.targets @@ -335,6 +335,7 @@ Copyright (c) .NET Foundation. All rights reserved. %24([MSBuild]::NormalizePath('%24(MSBuildThisFileDirectory)..\..\')) %24([MSBuild]::EnsureTrailingSlash('%24(NetCoreRoot)'))packs + <_NetFrameworkHostedCompilersVersion>$(MicrosoftNetCompilersToolsetPackageVersion) $(_NETCoreAppTargetFrameworkVersion) $(_NETCoreAppTargetFrameworkVersion) $(_NETCoreAppPackageVersion) diff --git a/test/EndToEnd/ProjectBuildTests.cs b/test/EndToEnd/ProjectBuildTests.cs index ec6684750..a19309b52 100644 --- a/test/EndToEnd/ProjectBuildTests.cs +++ b/test/EndToEnd/ProjectBuildTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices; @@ -115,7 +116,7 @@ namespace EndToEnd.Tests .Execute(newArgs) .Should().Pass(); - string publishArgs="-r win-arm64"; + string publishArgs = "-r win-arm64"; new PublishCommand() .WithWorkingDirectory(projectDirectory) .Execute(publishArgs) @@ -149,7 +150,7 @@ namespace EndToEnd.Tests .Execute(newArgs) .Should().Pass(); - string publishArgs="-r win-arm64"; + string publishArgs = "-r win-arm64"; new PublishCommand() .WithWorkingDirectory(projectDirectory) .Execute(publishArgs) @@ -248,6 +249,47 @@ namespace EndToEnd.Tests Assert.True(directory.EnumerateFileSystemInfos().Any()); } + [Theory] + // microsoft.dotnet.common.itemtemplates templates + [InlineData("class")] + [InlineData("struct")] + [InlineData("enum")] + [InlineData("record")] + [InlineData("interface")] + [InlineData("class", "C#")] + [InlineData("class", "VB")] + [InlineData("struct", "VB")] + [InlineData("enum", "VB")] + [InlineData("interface", "VB")] + public void ItCanCreateItemTemplateWithProjectRestriction(string templateName, string language = "") + { + var languageExtensionMap = new Dictionary() + { + { "", ".cs" }, + { "C#", ".cs" }, + { "VB", ".vb" } + }; + + DirectoryInfo directory = InstantiateProjectTemplate("classlib", language, withNoRestore: false); + string projectDirectory = directory.FullName; + string expectedItemName = $"TestItem_{templateName}"; + string newArgs = $"{templateName} --name {expectedItemName} --debug:ephemeral-hive"; + if (!string.IsNullOrWhiteSpace(language)) + { + newArgs += $" --language {language}"; + } + + new NewCommandShim() + .WithWorkingDirectory(projectDirectory) + .Execute(newArgs) + .Should().Pass(); + + //check if the template created files + Assert.True(directory.Exists); + Assert.True(directory.EnumerateFileSystemInfos().Any()); + Assert.True(directory.GetFile($"{expectedItemName}.{languageExtensionMap[language]}") != null); + } + [WindowsOnlyTheory] [InlineData("wpf", Skip = "https://github.com/dotnet/wpf/issues/2363")] [InlineData("winforms", Skip = "https://github.com/dotnet/wpf/issues/2363")] @@ -402,20 +444,9 @@ namespace EndToEnd.Tests private static void TestTemplateCreateAndBuild(string templateName, bool build = true, bool selfContained = false, string language = "", string framework = "") { - DirectoryInfo directory = TestAssets.CreateTestDirectory(identifier: string.IsNullOrWhiteSpace(language) ? templateName : $"{templateName}[{language}]"); + DirectoryInfo directory = InstantiateProjectTemplate(templateName, language); string projectDirectory = directory.FullName; - string newArgs = $"{templateName} --debug:ephemeral-hive --no-restore"; - if (!string.IsNullOrWhiteSpace(language)) - { - newArgs += $" --language {language}"; - } - - new NewCommandShim() - .WithWorkingDirectory(projectDirectory) - .Execute(newArgs) - .Should().Pass(); - if (!string.IsNullOrWhiteSpace(framework)) { //check if MSBuild TargetFramework property for *proj is set to expected framework @@ -439,13 +470,13 @@ namespace EndToEnd.Tests { buildArgs += $" --framework {framework}"; } - + // Remove this (or formalize it) after https://github.com/dotnet/installer/issues/12479 is resolved. if (language == "F#") { buildArgs += $" /p:_NETCoreSdkIsPreview=true"; } - + string dotnetRoot = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest); new BuildCommand() .WithEnvironmentVariable("PATH", dotnetRoot) // override PATH since razor rely on PATH to find dotnet @@ -454,5 +485,27 @@ namespace EndToEnd.Tests .Should().Pass(); } } + + private static DirectoryInfo InstantiateProjectTemplate(string templateName, string language = "", bool withNoRestore = true) + { + DirectoryInfo directory = TestAssets.CreateTestDirectory( + identifier: string.IsNullOrWhiteSpace(language) + ? templateName + : $"{templateName}[{language}]"); + string projectDirectory = directory.FullName; + + string newArgs = $"{templateName} --debug:ephemeral-hive {(withNoRestore ? "--no-restore" : "")}"; + if (!string.IsNullOrWhiteSpace(language)) + { + newArgs += $" --language {language}"; + } + + new NewCommandShim() + .WithWorkingDirectory(projectDirectory) + .Execute(newArgs) + .Should().Pass(); + + return directory; + } } }