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
2 changes: 1 addition & 1 deletion TemplateEngine.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"src\\Tests\\dotnet-new.Tests\\dotnet-new.IntegrationTests.csproj",
"src\\Tests\\dotnet.Tests\\dotnet.Tests.csproj",
"template_feed\\Microsoft.DotNet.Common.ItemTemplates\\Microsoft.DotNet.Common.ItemTemplates.csproj",
"template_feed\\Microsoft.DotNet.Common.ProjectTemplates.7.0\\Microsoft.DotNet.Common.ProjectTemplates.7.0.csproj"
"template_feed\\Microsoft.DotNet.Common.ProjectTemplates.8.0\\Microsoft.DotNet.Common.ProjectTemplates.8.0.csproj"
]
}
}
2 changes: 2 additions & 0 deletions documentation/general/UpdateToNewTargetFramework.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
- Branding -- https://github.com/dotnet/sdk/pull/20212
- Blazor baselines -- https://github.com/dotnet/sdk/pull/20859/commits/564908ede75bfe0e5575ac8246c5e409b9c044ec
- 7.0 feeds -- https://github.com/dotnet/sdk/pull/19824/commits/c26b43e3e20269d04892847c4cbf6641a042b658
- updating template packages -- https://github.com/dotnet/sdk/pull/27486


**Interesting user commits to installer**

Expand Down
2 changes: 1 addition & 1 deletion sdk.sln
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "template_feed", "template_f
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Common.ItemTemplates", "template_feed\Microsoft.DotNet.Common.ItemTemplates\Microsoft.DotNet.Common.ItemTemplates.csproj", "{92F4E400-8C28-41B9-9D7D-8E9A4535636B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Common.ProjectTemplates.7.0", "template_feed\Microsoft.DotNet.Common.ProjectTemplates.7.0\Microsoft.DotNet.Common.ProjectTemplates.7.0.csproj", "{AB7ADCF8-48AC-4885-9C70-16D752B97168}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.Common.ProjectTemplates.8.0", "template_feed\Microsoft.DotNet.Common.ProjectTemplates.8.0\Microsoft.DotNet.Common.ProjectTemplates.8.0.csproj", "{AB7ADCF8-48AC-4885-9C70-16D752B97168}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-new.IntegrationTests", "src\Tests\dotnet-new.Tests\dotnet-new.IntegrationTests.csproj", "{8868D816-C072-4B66-84D6-7E014EA16D48}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion source-build.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"src\\WebSdk\\Web\\Tasks\\Microsoft.NET.Sdk.Web.Tasks.csproj",
"src\\WebSdk\\Worker\\Tasks\\Microsoft.NET.Sdk.Worker.Tasks.csproj",
"template_feed\\Microsoft.DotNet.Common.ItemTemplates\\Microsoft.DotNet.Common.ItemTemplates.csproj",
"template_feed\\Microsoft.DotNet.Common.ProjectTemplates.7.0\\Microsoft.DotNet.Common.ProjectTemplates.7.0.csproj"
"template_feed\\Microsoft.DotNet.Common.ProjectTemplates.8.0\\Microsoft.DotNet.Common.ProjectTemplates.8.0.csproj"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ internal partial class InstantiateCommand : BaseCommand<InstantiateCommandArgs>
{
private static readonly TimeSpan ConstraintEvaluationTimeout = TimeSpan.FromMilliseconds(1000);

internal static IEnumerable<CompletionItem> GetTemplateNameCompletions(string? tempalteName, IEnumerable<TemplateGroup> templateGroups, IEngineEnvironmentSettings environmentSettings)
internal static IEnumerable<CompletionItem> GetTemplateNameCompletions(string? templateName, IEnumerable<TemplateGroup> templateGroups, IEngineEnvironmentSettings environmentSettings)
{
TemplateConstraintManager constraintManager = new(environmentSettings);
if (string.IsNullOrWhiteSpace(tempalteName))
if (string.IsNullOrWhiteSpace(templateName))
{
return GetAllowedTemplateGroups(constraintManager, templateGroups)
.SelectMany(g => g.ShortNames, (g, shortName) => new CompletionItem(shortName, documentation: g.Description))
.Select(g => new CompletionItem(g.ShortNames[0], documentation: g.Description))
.Distinct()
.OrderBy(c => c.Label, StringComparer.OrdinalIgnoreCase)
.ToArray();
}

IEnumerable<TemplateGroup> matchingTemplateGroups = templateGroups.Where(t => t.ShortNames.Any(sn => sn.StartsWith(tempalteName, StringComparison.OrdinalIgnoreCase)));
IEnumerable<TemplateGroup> matchingTemplateGroups =
templateGroups.Where(t => t.ShortNames.Any(sn => sn.StartsWith(templateName, StringComparison.OrdinalIgnoreCase)));

return GetAllowedTemplateGroups(constraintManager, matchingTemplateGroups)
.SelectMany(g => g.ShortNames, (g, shortName) => new CompletionItem(shortName, documentation: g.Description))
.Where(c => c.Label.StartsWith(tempalteName))
.Select(g => new CompletionItem(g.ShortNames.First(sn => sn.StartsWith(templateName, StringComparison.OrdinalIgnoreCase)), documentation: g.Description))
.Distinct()
.OrderBy(c => c.Label, StringComparer.OrdinalIgnoreCase)
.ToArray();
Expand Down
2 changes: 1 addition & 1 deletion src/Layout/redist/targets/OverlaySdkOnLKG.targets
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<Error Text="SDK Stage 0 has more than one folder with templates: @(TemplatesFolderPath->'%(FolderName)')" Condition="@(TemplatesFolderPath->Count()) > 1"></Error>

<!--Prepare Microsoft.DotNet.Common.*.nupkg and pack them directly to target <redist root>\templates\<runtime version> folder. -->
<Exec Command="$(DotnetTool) pack $(RepoRoot)template_feed\Microsoft.DotNet.Common.ProjectTemplates.7.0 --configuration $(Configuration) --output $(RedistLayoutPath)\templates\@(TemplatesFolderPath->'%(FolderName)')\" />
<Exec Command="$(DotnetTool) pack $(RepoRoot)template_feed\Microsoft.DotNet.Common.ProjectTemplates.8.0 --configuration $(Configuration) --output $(RedistLayoutPath)\templates\@(TemplatesFolderPath->'%(FolderName)')\" />
<Exec Command="$(DotnetTool) pack $(RepoRoot)template_feed\Microsoft.DotNet.Common.ItemTemplates --configuration $(Configuration) --output $(RedistLayoutPath)\templates\@(TemplatesFolderPath->'%(FolderName)')\" />

<!-- 2. Other template packages will be included from SDK Stage 0. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@
InsertText: sln,
Documentation: Create an empty solution containing no projects
},
{
Label: solution,
Kind: Value,
SortText: solution,
InsertText: solution,
Documentation: Create an empty solution containing no projects
},
{
Label: tool-manifest,
Kind: Value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@
InsertText: sln,
Documentation: Create an empty solution containing no projects
},
{
Label: solution,
Kind: Value,
SortText: solution,
InsertText: solution,
Documentation: Create an empty solution containing no projects
},
{
Label: tool-manifest,
Kind: Value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
Detail:
The target framework for the project.
Type: choice
net7.0 Target net7.0
Default: net7.0
net8.0 Target net8.0
Default: net8.0

},
{
Expand Down Expand Up @@ -114,8 +114,8 @@ Default: false
Detail:
The target framework for the project.
Type: choice
net7.0 Target net7.0
Default: net7.0
net8.0 Target net8.0
Default: net8.0

},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ NUnit-playwright
nunit-test
page
proto
razor
razorclasslib
razorcomponent
react
sln
solution
tool-manifest
viewimports
viewstart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ NUnit-playwright
nunit-test
page
proto
razor
razorclasslib
razorcomponent
react
sln
solution
tool-manifest
viewimports
viewstart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ NUnit-playwright
nunit-test
page
proto
razor
razorclasslib
razorcomponent
react
sln
solution
tool-manifest
viewimports
viewstart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ Options:
--type <project> Specifies the template type to instantiate.

Template options:
-f, --framework <net5.0|net7.0|netcoreapp3.1> The target framework for the project.
Type: choice
net7.0 Target net7.0
net5.0 Target net5.0
netcoreapp3.1 Target netcoreapp3.1
Default: net7.0
--no-restore If specified, skips the automatic restore of the project on create.
Type: bool
Default: false
-f, --framework <net6.0|net7.0|net8.0> The target framework for the project.
Type: choice
net8.0 Target net8.0
net7.0 Target net7.0
net6.0 Target net6.0
Default: net8.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,20 +16,20 @@ Options:
--type <project> Specifies the template type to instantiate.

Template options:
-f, --framework <net5.0|net7.0|netcoreapp3.1> The target framework for the project.
Type: choice
net7.0 Target net7.0
net5.0 Target net5.0
netcoreapp3.1 Target netcoreapp3.1
Default: net7.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
-f, --framework <net6.0|net7.0|net8.0> The target framework for the project.
Type: choice
net8.0 Target net8.0
net7.0 Target net7.0
net6.0 Target net6.0
Default: net8.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

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,19 +16,19 @@ Options:
--type <project> Specifies the template type to instantiate.

Template options:
-f, --framework <net5.0|net7.0|netcoreapp3.1|netstandard2.0|netstandard2.1> The target framework for the project.
Type: choice
net7.0 Target net7.0
netstandard2.1 Target netstandard2.1
netstandard2.0 Target netstandard2.0
net5.0 Target net5.0
netcoreapp3.1 Target netcoreapp3.1
Default: net7.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 <net6.0|net7.0|net8.0|netstandard2.0|netstandard2.1> The target framework for the project.
Type: choice
net8.0 Target net8.0
netstandard2.1 Target netstandard2.1
netstandard2.0 Target netstandard2.0
net7.0 Target net7.0
net6.0 Target net6.0
Default: net8.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,20 +16,20 @@ Options:
--type <project> Specifies the template type to instantiate.

Template options:
-f, --framework <net5.0|net7.0|netcoreapp3.1> The target framework for the project.
Type: choice
net7.0 Target net7.0
net5.0 Target net5.0
netcoreapp3.1 Target netcoreapp3.1
Default: net7.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
-f, --framework <net6.0|net7.0|net8.0> The target framework for the project.
Type: choice
net8.0 Target net8.0
net7.0 Target net7.0
net6.0 Target net6.0
Default: net8.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

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 @@ -4,6 +4,7 @@ Description: A file for selecting the .NET SDK version.

Usage:
dotnet new globaljson [options] [template options]
dotnet new global.json [options] [template options]

Options:
-n, --name <name> The name for the output being created. If no name is specified, the name of the output directory is used.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Error: Invalid option(s):
--framework
'' is not a valid value for --framework. The possible values are:
net5.0 - Target net5.0
net7.0 - Target net7.0
netcoreapp3.1 - Target netcoreapp3.1
net6.0 - Target net6.0
net7.0 - Target net7.0
net8.0 - Target net8.0

For more information, run:
dotnet new console -h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
'--fake' is not a valid option
--framework netcoreapp
'netcoreapp' is not a valid value for --framework. The possible values are:
net5.0 - Target net5.0
net7.0 - Target net7.0
netcoreapp3.1 - Target netcoreapp3.1
net6.0 - Target net6.0
net7.0 - Target net7.0
net8.0 - Target net8.0

For more information, run:
dotnet new console -h
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Error: Invalid option(s):
--framework fake
'fake' is not a valid value for --framework. The possible values are:
net5.0 - Target net5.0
net7.0 - Target net7.0
netcoreapp3.1 - Target netcoreapp3.1
net6.0 - Target net6.0
net7.0 - Target net7.0
net8.0 - Target net8.0

For more information, run:
dotnet new console -h
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Error: Invalid option(s):
--framework netcoreapp
'netcoreapp' is not a valid value for --framework. The possible values are:
net5.0 - Target net5.0
net7.0 - Target net7.0
netcoreapp3.1 - Target netcoreapp3.1
--framework net
'net' is not a valid value for --framework. The possible values are:
net6.0 - Target net6.0
net7.0 - Target net7.0
net8.0 - Target net8.0

For more information, run:
dotnet new console -h
Expand Down
Loading