Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@ Options:
--type <project> Specifies the template type to instantiate.

Template options:
-f, --framework <net10.0|net6.0|net7.0|net8.0> 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 <net10.0|net6.0|net7.0|net8.0|net9.0> 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#
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,25 @@ Options:
--type <project> Specifies the template type to instantiate.

Template options:
-f, --framework <net10.0|net6.0|net7.0|net8.0> 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 <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 <net10.0|net6.0|net7.0|net8.0|net9.0> 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 <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#
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@ Options:
--type <project> Specifies the template type to instantiate.

Template options:
-f, --framework <net10.0|net6.0|net7.0|net8.0|netstandard2.0|netstandard2.1> 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 <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 <net10.0|net6.0|net7.0|net8.0|net9.0|netstandard2.0|netstandard2.1> 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 <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#
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,25 @@ Options:
--type <project> Specifies the template type to instantiate.

Template options:
-f, --framework <net10.0|net6.0|net7.0|net8.0> 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 <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 <net10.0|net6.0|net7.0|net8.0|net9.0> 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 <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#
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions test/dotnet-new.Tests/SharedHomeDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}
4 changes: 4 additions & 0 deletions test/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
<PackageReference Include="Microsoft.DotNet.Common.ProjectTemplates.6.0" VersionOverride="6.0.*" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.DotNet.Common.ProjectTemplates.7.0" VersionOverride="7.0.*-*" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.DotNet.Common.ProjectTemplates.8.0" VersionOverride="8.0.*-*" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.DotNet.Common.ProjectTemplates.9.0" VersionOverride="9.0.*-*" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.DotNet.Web.ProjectTemplates.6.0" VersionOverride="6.0.*" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.DotNet.Web.ProjectTemplates.7.0" VersionOverride="7.0.*-*" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.DotNet.Web.ProjectTemplates.8.0" VersionOverride="8.0.*-*" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.DotNet.Web.ProjectTemplates.9.0" VersionOverride="9.0.*-*" GeneratePathProperty="true" />
</ItemGroup>

<PropertyGroup>
Expand All @@ -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
Expand Down
Loading