diff --git a/NuGet.config b/NuGet.config index 7a06aa9e3e33..f7ed42461f2e 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,6 +4,9 @@ + + + @@ -40,6 +43,10 @@ + + + + diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 60d4bcb7fb46..6d9456098e6c 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -1,3 +1,4 @@ + + + 10.0.200-preview.25563.5 + 10.0.200-preview.25563.5 + 10.0.200-preview.25563.5 + 10.0.200-preview.25563.5 + 10.0.200-preview.25563.5 + 10.0.200-preview.25563.5 + 10.0.200-preview.25563.5 + 10.0.200-preview.25563.5 + 10.0.200-preview.25563.5 10.0.0-rc.3.25567.101 10.0.0-rc.3.25567.101 diff --git a/eng/Versions.props b/eng/Versions.props index 52b57770b454..3b9dc3f5e9d8 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -38,8 +38,8 @@ 36 20 - 21 - 10 + 22 + 11 <_NET70ILLinkPackVersion>7.0.100-1.23211.1 diff --git a/src/BuiltInTools/Web.Middleware/WebSocketScriptInjection.js b/src/BuiltInTools/Web.Middleware/WebSocketScriptInjection.js index 44d6ae3250ad..e03aaeb5d477 100644 --- a/src/BuiltInTools/Web.Middleware/WebSocketScriptInjection.js +++ b/src/BuiltInTools/Web.Middleware/WebSocketScriptInjection.js @@ -208,6 +208,11 @@ setTimeout(async function () { console.debug('Reporting Hot Reload diagnostics.'); document.querySelectorAll('#dotnet-compile-error').forEach(el => el.remove()); + + if (diagnostics.length == 0) { + return; + } + const el = document.body.appendChild(document.createElement('div')); el.id = 'dotnet-compile-error'; el.setAttribute('style', 'z-index:1000000; position:fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.5); color:black; overflow: scroll;'); diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/CommandDefinitions/CollectionExtensions.cs b/src/Cli/Microsoft.TemplateEngine.Cli/CommandDefinitions/CollectionExtensions.cs new file mode 100644 index 000000000000..e6fdd134c22d --- /dev/null +++ b/src/Cli/Microsoft.TemplateEngine.Cli/CommandDefinitions/CollectionExtensions.cs @@ -0,0 +1,15 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.TemplateEngine.Cli; + +internal static class CollectionExtensions +{ + public static void AddRange(this ICollection collection, IEnumerable items) + { + foreach (T item in items) + { + collection.Add(item); + } + } +} diff --git a/src/Cli/Microsoft.TemplateEngine.Cli/CommandDefinitions/CommandDefinition.cs b/src/Cli/Microsoft.TemplateEngine.Cli/CommandDefinitions/CommandDefinition.cs new file mode 100644 index 000000000000..a65d0a8d2009 --- /dev/null +++ b/src/Cli/Microsoft.TemplateEngine.Cli/CommandDefinitions/CommandDefinition.cs @@ -0,0 +1,516 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +#pragma warning disable CA1810 // Initialize reference type static fields inline + +using System.CommandLine; +using Microsoft.TemplateEngine.Cli.Commands; + +namespace Microsoft.TemplateEngine.Cli; + +internal class CommandDefinition(string name, string description) : Command(name, description) +{ + public static class New + { + public static readonly Option DebugCustomSettingsLocationOption = new("--debug:custom-hive") + { + Description = SymbolStrings.Option_Debug_CustomSettings, + Hidden = true, + Recursive = true + }; + + public static readonly Option DebugVirtualizeSettingsOption = new("--debug:ephemeral-hive", "--debug:virtual-hive") + { + Description = SymbolStrings.Option_Debug_VirtualSettings, + Hidden = true, + Recursive = true + }; + + public static readonly Option DebugAttachOption = new("--debug:attach") + { + Description = SymbolStrings.Option_Debug_Attach, + Hidden = true, + Recursive = true + }; + + public static readonly Option DebugReinitOption = new("--debug:reinit") + { + Description = SymbolStrings.Option_Debug_Reinit, + Hidden = true, + Recursive = true + }; + + public static readonly Option DebugRebuildCacheOption = new("--debug:rebuild-cache", "--debug:rebuildcache") + { + Description = SymbolStrings.Option_Debug_RebuildCache, + Hidden = true, + Recursive = true + }; + + public static readonly Option DebugShowConfigOption = new("--debug:show-config", "--debug:showconfig") + { + Description = SymbolStrings.Option_Debug_ShowConfig, + Hidden = true, + Recursive = true + }; + + public static readonly Argument ShortNameArgument = new("template-short-name") + { + Description = SymbolStrings.Command_Instantiate_Argument_ShortName, + Arity = new ArgumentArity(0, 1), + Hidden = true + }; + + public static readonly Argument RemainingArguments = new("template-args") + { + Description = SymbolStrings.Command_Instantiate_Argument_TemplateOptions, + Arity = new ArgumentArity(0, 999), + Hidden = true + }; + + public static readonly Option InteractiveOption = SharedOptionsFactory.CreateInteractiveOption().AsHidden(); + + public static readonly Option AddSourceOption = SharedOptionsFactory.CreateAddSourceOption().AsHidden().DisableAllowMultipleArgumentsPerToken(); + + public static readonly Option ColumnsAllOption = SharedOptionsFactory.CreateColumnsAllOption().AsHidden(); + + public static readonly Option ColumnsOption = SharedOptionsFactory.CreateColumnsOption().AsHidden().DisableAllowMultipleArgumentsPerToken(); + + public static IReadOnlyList