diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_MatchOnLanguage.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_MatchOnLanguage.verified.txt index c8b6d687ece2..88dddbd16725 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_MatchOnLanguage.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_MatchOnLanguage.verified.txt @@ -16,16 +16,17 @@ Options: --type Specifies the template type to instantiate. Template options: - -f, --framework The target framework for the project. - Type: choice - net10.0 Target net10.0 - net8.0 Target net8.0 - net7.0 Target net7.0 - net6.0 Target net6.0 - Default: net10.0 - --no-restore If specified, skips the automatic restore of the project on create. - Type: bool - Default: false + -f, --framework The target framework for the project. + Type: choice + net10.0 Target net10.0 + net9.0 Target net9.0 + net8.0 Target net8.0 + net7.0 Target net7.0 + net6.0 Target net6.0 + Default: net10.0 + --no-restore If specified, skips the automatic restore of the project on create. + Type: bool + Default: false To see help for other template languages (C#, VB), use --language option: dotnet new console -h --language C# \ No newline at end of file diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_MatchOnNonChoiceParam.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_MatchOnNonChoiceParam.verified.txt index 46ecba8cc56e..1abc77fddd46 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_MatchOnNonChoiceParam.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_MatchOnNonChoiceParam.verified.txt @@ -16,24 +16,25 @@ Options: --type Specifies the template type to instantiate. Template options: - -f, --framework The target framework for the project. - Type: choice - net10.0 Target net10.0 - net8.0 Target net8.0 - net7.0 Target net7.0 - net6.0 Target net6.0 - Default: net10.0 - --langVersion Sets the LangVersion property in the created project file - Type: text - --no-restore If specified, skips the automatic restore of the project on create. - Type: bool - Default: false - --use-program-main Whether to generate an explicit Program class and Main method instead of top-level statements. - Type: bool - Default: false - --aot Whether to enable the project for publishing as native AOT. - Type: bool - Default: false + -f, --framework The target framework for the project. + Type: choice + net10.0 Target net10.0 + net9.0 Target net9.0 + net8.0 Target net8.0 + net7.0 Target net7.0 + net6.0 Target net6.0 + Default: net10.0 + --langVersion Sets the LangVersion property in the created project file + Type: text + --no-restore If specified, skips the automatic restore of the project on create. + Type: bool + Default: false + --use-program-main Whether to generate an explicit Program class and Main method instead of top-level statements. + Type: bool + Default: false + --aot Whether to enable the project for publishing as native AOT. + Type: bool + Default: false To see help for other template languages (F#, VB), use --language option: dotnet new console -h --language F# \ No newline at end of file diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_classlib.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_classlib.verified.txt index ee4e178c5b2f..0f0749f71b7d 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_classlib.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_classlib.verified.txt @@ -16,20 +16,21 @@ Options: --type Specifies the template type to instantiate. Template options: - -f, --framework The target framework for the project. - Type: choice - net10.0 Target net10.0 - netstandard2.1 Target netstandard2.1 - netstandard2.0 Target netstandard2.0 - net8.0 Target net8.0 - net7.0 Target net7.0 - net6.0 Target net6.0 - Default: net10.0 - --langVersion Sets the LangVersion property in the created project file - Type: text - --no-restore If specified, skips the automatic restore of the project on create. - Type: bool - Default: false + -f, --framework The target framework for the project. + Type: choice + net10.0 Target net10.0 + netstandard2.1 Target netstandard2.1 + netstandard2.0 Target netstandard2.0 + net9.0 Target net9.0 + net8.0 Target net8.0 + net7.0 Target net7.0 + net6.0 Target net6.0 + Default: net10.0 + --langVersion Sets the LangVersion property in the created project file + Type: text + --no-restore If specified, skips the automatic restore of the project on create. + Type: bool + Default: false To see help for other template languages (F#, VB), use --language option: dotnet new classlib -h --language F# \ No newline at end of file diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_console.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_console.verified.txt index 46ecba8cc56e..1abc77fddd46 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_console.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CanShowHelpForTemplate_console.verified.txt @@ -16,24 +16,25 @@ Options: --type Specifies the template type to instantiate. Template options: - -f, --framework The target framework for the project. - Type: choice - net10.0 Target net10.0 - net8.0 Target net8.0 - net7.0 Target net7.0 - net6.0 Target net6.0 - Default: net10.0 - --langVersion Sets the LangVersion property in the created project file - Type: text - --no-restore If specified, skips the automatic restore of the project on create. - Type: bool - Default: false - --use-program-main Whether to generate an explicit Program class and Main method instead of top-level statements. - Type: bool - Default: false - --aot Whether to enable the project for publishing as native AOT. - Type: bool - Default: false + -f, --framework The target framework for the project. + Type: choice + net10.0 Target net10.0 + net9.0 Target net9.0 + net8.0 Target net8.0 + net7.0 Target net7.0 + net6.0 Target net6.0 + Default: net10.0 + --langVersion Sets the LangVersion property in the created project file + Type: text + --no-restore If specified, skips the automatic restore of the project on create. + Type: bool + Default: false + --use-program-main Whether to generate an explicit Program class and Main method instead of top-level statements. + Type: bool + Default: false + --aot Whether to enable the project for publishing as native AOT. + Type: bool + Default: false To see help for other template languages (F#, VB), use --language option: dotnet new console -h --language F# \ No newline at end of file diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CannotShowHelpForTemplate_MatchOnChoiceWithoutValue.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CannotShowHelpForTemplate_MatchOnChoiceWithoutValue.verified.txt index bd5e0e2767b4..ebe0c2510a9d 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CannotShowHelpForTemplate_MatchOnChoiceWithoutValue.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewHelpTests.CannotShowHelpForTemplate_MatchOnChoiceWithoutValue.verified.txt @@ -5,6 +5,7 @@ net6.0 - Target net6.0 net7.0 - Target net7.0 net8.0 - Target net8.0 + net9.0 - Target net9.0 For more information, run: dotnet new console -h \ No newline at end of file diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewInstantiateTests.CannotInstantiateTemplate_OnMultipleParameterErrors.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewInstantiateTests.CannotInstantiateTemplate_OnMultipleParameterErrors.verified.txt index 66157d695e62..7f71f6b661b6 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewInstantiateTests.CannotInstantiateTemplate_OnMultipleParameterErrors.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewInstantiateTests.CannotInstantiateTemplate_OnMultipleParameterErrors.verified.txt @@ -7,6 +7,7 @@ net6.0 - Target net6.0 net7.0 - Target net7.0 net8.0 - Target net8.0 + net9.0 - Target net9.0 For more information, run: dotnet new console -h diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewInstantiateTests.CannotInstantiateTemplate_WhenChoiceParameterValueIsInvalid.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewInstantiateTests.CannotInstantiateTemplate_WhenChoiceParameterValueIsInvalid.verified.txt index d6fdd714180d..6c3a5d00fca2 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewInstantiateTests.CannotInstantiateTemplate_WhenChoiceParameterValueIsInvalid.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewInstantiateTests.CannotInstantiateTemplate_WhenChoiceParameterValueIsInvalid.verified.txt @@ -5,6 +5,7 @@ net6.0 - Target net6.0 net7.0 - Target net7.0 net8.0 - Target net8.0 + net9.0 - Target net9.0 For more information, run: dotnet new console -h diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewInstantiateTests.CannotInstantiateTemplate_WhenChoiceParameterValueIsNotComplete.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewInstantiateTests.CannotInstantiateTemplate_WhenChoiceParameterValueIsNotComplete.verified.txt index 11d385423728..ac08bbdee3fd 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewInstantiateTests.CannotInstantiateTemplate_WhenChoiceParameterValueIsNotComplete.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewInstantiateTests.CannotInstantiateTemplate_WhenChoiceParameterValueIsNotComplete.verified.txt @@ -5,6 +5,7 @@ net6.0 - Target net6.0 net7.0 - Target net7.0 net8.0 - Target net8.0 + net9.0 - Target net9.0 For more information, run: dotnet new console -h diff --git a/test/dotnet-new.Tests/SharedHomeDirectory.cs b/test/dotnet-new.Tests/SharedHomeDirectory.cs index 9f724d8c53e9..e7b91db01f32 100644 --- a/test/dotnet-new.Tests/SharedHomeDirectory.cs +++ b/test/dotnet-new.Tests/SharedHomeDirectory.cs @@ -91,6 +91,14 @@ private void Initialize() .ExitWith(0) .And .NotHaveStdErr(); + + new DotnetNewCommand(Log, "install", TemplatePackagesPaths.MicrosoftDotNetCommonProjectTemplates90Path) + .WithCustomHive(HomeDirectory) + .Execute() + .Should() + .ExitWith(0) + .And + .NotHaveStdErr(); } } } diff --git a/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj b/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj index 4e24da727590..34dc8117fd36 100644 --- a/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj +++ b/test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj @@ -26,9 +26,11 @@ + + @@ -41,9 +43,11 @@ namespace Microsoft.DotNet.Cli.New.IntegrationTests public const string MicrosoftDotNetCommonProjectTemplates60Path = @"$(PkgMicrosoft_DotNet_Common_ProjectTemplates_6_0)"%3B public const string MicrosoftDotNetCommonProjectTemplates70Path = @"$(PkgMicrosoft_DotNet_Common_ProjectTemplates_7_0)"%3B public const string MicrosoftDotNetCommonProjectTemplates80Path = @"$(PkgMicrosoft_DotNet_Common_ProjectTemplates_8_0)"%3B + public const string MicrosoftDotNetCommonProjectTemplates90Path = @"$(PkgMicrosoft_DotNet_Common_ProjectTemplates_9_0)"%3B public const string MicrosoftDotNetWebProjectTemplates60Path = @"$(PkgMicrosoft_DotNet_Web_ProjectTemplates_6_0)"%3B public const string MicrosoftDotNetWebProjectTemplates70Path = @"$(PkgMicrosoft_DotNet_Web_ProjectTemplates_7_0)"%3B public const string MicrosoftDotNetWebProjectTemplates80Path = @"$(PkgMicrosoft_DotNet_Web_ProjectTemplates_8_0)"%3B + public const string MicrosoftDotNetWebProjectTemplates90Path = @"$(PkgMicrosoft_DotNet_Web_ProjectTemplates_9_0)"%3B } internal class TemplatePackageVersion