diff --git a/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/Uno.ProjectTemplates.Dotnet.csproj b/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/Uno.ProjectTemplates.Dotnet.csproj index 108ee2489098..3c04bab652ed 100644 --- a/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/Uno.ProjectTemplates.Dotnet.csproj +++ b/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/Uno.ProjectTemplates.Dotnet.csproj @@ -320,6 +320,7 @@ .Replace("UseAppKit", "macos") .Replace("UseCatalyst", "maccatalyst") .Replace("UseServer", "hosted") + .Replace("UseWebAssemblyManifestJson", "wasm-pwa-manifest") .Replace("$basetargetframework$", "net6.0") ; @@ -410,7 +411,7 @@ Directory.EnumerateFiles(SourcePath, f, SearchOption.AllDirectories))) { @@ -463,6 +464,6 @@ - + diff --git a/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/content/unoapp-uwp-net6/.template.config/template.json b/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/content/unoapp-uwp-net6/.template.config/template.json index 35c889de5e5c..c47e2094adba 100644 --- a/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/content/unoapp-uwp-net6/.template.config/template.json +++ b/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/content/unoapp-uwp-net6/.template.config/template.json @@ -125,7 +125,13 @@ "datatype": "bool", "description": "If specified, skips the automatic restore of the project on create.", "defaultValue": "false" - } + }, + "wasm-pwa-manifest": { + "type": "parameter", + "datatype": "bool", + "description": "Enables the generation of a PWA manifest for WebAssembly", + "defaultValue": "false" + } }, "primaryOutputs": [ { @@ -215,6 +221,13 @@ "exclude": [ ".vscode/**/*" ] + }, + { + "condition": "(!wasm-pwa-manifest)", + "exclude": [ + "UnoQuickStart.Wasm/manifest.json", + "UnoQuickStart.Wasm/Assets/AppIcon-*" + ] } ] } diff --git a/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/content/unoapp/.template.config/template.json b/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/content/unoapp/.template.config/template.json index 001fb290f951..5d0d31b4c540 100644 --- a/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/content/unoapp/.template.config/template.json +++ b/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/content/unoapp/.template.config/template.json @@ -149,6 +149,12 @@ "description": "If specified, skips the automatic restore of the project on create.", "defaultValue": "false" }, + "wasm-pwa-manifest": { + "type": "parameter", + "datatype": "bool", + "description": "Enables the generation of a PWA manifest for WebAssembly", + "defaultValue": "false" + }, "android": { "type": "generated", "generator": "constant", @@ -292,6 +298,13 @@ "exclude": [ ".vscode/**/*" ] + }, + { + "condition": "(!wasm-pwa-manifest)", + "exclude": [ + "UnoWinUIQuickStart.Wasm/manifest.json", + "UnoWinUIQuickStart.Wasm/Assets/AppIcon-*" + ] } ] } diff --git a/src/SolutionTemplate/UnoSolutionTemplate.WinUI.net6/UnoSolutionTemplate.WinUI.net6.csproj b/src/SolutionTemplate/UnoSolutionTemplate.WinUI.net6/UnoSolutionTemplate.WinUI.net6.csproj index df0e5c6fde7d..c85cc23a42cb 100644 --- a/src/SolutionTemplate/UnoSolutionTemplate.WinUI.net6/UnoSolutionTemplate.WinUI.net6.csproj +++ b/src/SolutionTemplate/UnoSolutionTemplate.WinUI.net6/UnoSolutionTemplate.WinUI.net6.csproj @@ -252,6 +252,7 @@ + diff --git a/src/SolutionTemplate/UnoSolutionTemplate.WinUI.net6/Wasm/UnoQuickStart.Wasm.csproj b/src/SolutionTemplate/UnoSolutionTemplate.WinUI.net6/Wasm/UnoQuickStart.Wasm.csproj index 5e3452c33ba8..bc6e3bc2d3b6 100644 --- a/src/SolutionTemplate/UnoSolutionTemplate.WinUI.net6/Wasm/UnoQuickStart.Wasm.csproj +++ b/src/SolutionTemplate/UnoSolutionTemplate.WinUI.net6/Wasm/UnoQuickStart.Wasm.csproj @@ -4,8 +4,7 @@ Exe $basetargetframework$ NU1701 - - manifest.json + $if$($UseWebAssemblyManifestJson$ == True)manifest.json$endif$ diff --git a/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoOptions.cs b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoOptions.cs index 04bc002d86f6..ab9ec5838a4d 100644 --- a/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoOptions.cs +++ b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoOptions.cs @@ -12,10 +12,8 @@ namespace UnoSolutionTemplate.Wizard.Forms { - public partial class UnoOptions : Form + public partial class UnoOptions : UnoOptionsBaseForm { - private IServiceProvider _serviceProvider; - public bool UseWebAssembly => checkWebAssembly.Checked; public bool UseiOS => checkiOS.Checked; public bool UseAndroid => checkAndroid.Checked; @@ -35,79 +33,20 @@ public class TargetFrameworkOption } public UnoOptions(IServiceProvider serviceProvider) + : base(serviceProvider) { - ThreadHelper.ThrowIfNotOnUIThread(); - InitializeComponent(); - _serviceProvider = serviceProvider; - - if (_serviceProvider.GetService(typeof(IUIHostLocale)) is IUIHostLocale2 hostLocale) - { - UIDLGLOGFONT[] array = (UIDLGLOGFONT[])(object)new UIDLGLOGFONT[1]; - if (hostLocale.GetDialogFont(array) == 0) - { - Font = FontFromUIDLGLOGFONT(array[0]); - } - } + InitializeFont(); BaseTargetFramework.Items.Add(new TargetFrameworkOption { BaseValue = "net6.0", DisplayValue = ".NET 6.0" }); BaseTargetFramework.Items.Add(new TargetFrameworkOption { BaseValue = "net7.0", DisplayValue = ".NET 7.0" }); BaseTargetFramework.SelectedIndex = 0; } - private static Font FontFromUIDLGLOGFONT(UIDLGLOGFONT logFont) - { - var fonts = new char[logFont.lfFaceName.Length]; - - var num = 0; - ushort[] lfFaceName = logFont.lfFaceName; - foreach (ushort num2 in lfFaceName) - { - fonts[num++] = (char)num2; - } - - var familyName = new string(fonts); - var emSize = -logFont.lfHeight; - var fontStyle = FontStyle.Regular; - - if (logFont.lfItalic > 0) - { - fontStyle |= FontStyle.Italic; - } - if (logFont.lfUnderline > 0) - { - fontStyle |= FontStyle.Underline; - } - if (logFont.lfStrikeOut > 0) - { - fontStyle |= FontStyle.Strikeout; - } - if (logFont.lfWeight > 400) - { - fontStyle |= FontStyle.Bold; - } - - var unit = GraphicsUnit.Pixel; - var lfCharSet = logFont.lfCharSet; - - return new Font(familyName, emSize, fontStyle, unit, lfCharSet); - } - private void UnoOptions_Load(object sender, EventArgs e) { - using Graphics graphics = CreateGraphics(); - var sizeF = graphics.MeasureString(labelDescription.Text, Font); - - int widthRatio = (int)(sizeF.Width / (float)labelDescription.Width); - if (widthRatio != 0) - { - int heightCeil = (int)Math.Ceiling(sizeF.Height); - SuspendLayout(); - labelDescription.Height = heightCeil + widthRatio * heightCeil; - ResumeLayout(performLayout: true); - } - + ResizeLabelDescription(labelDescription); CenterToParent(); } diff --git a/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoOptionsBaseForm.cs b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoOptionsBaseForm.cs new file mode 100644 index 000000000000..79be1d6077f6 --- /dev/null +++ b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoOptionsBaseForm.cs @@ -0,0 +1,90 @@ +using System.Drawing; +using System; +using System.Windows.Forms; +using Microsoft.VisualStudio.Shell.Interop; +using Microsoft.VisualStudio.Shell; + +namespace UnoSolutionTemplate.Wizard.Forms +{ + public class UnoOptionsBaseForm : Form + { + private IServiceProvider _serviceProvider; + + public UnoOptionsBaseForm(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + } + + public UnoOptionsBaseForm() + { + + } + + protected void InitializeFont() + { + ThreadHelper.ThrowIfNotOnUIThread(); + + if (_serviceProvider.GetService(typeof(IUIHostLocale)) is IUIHostLocale2 hostLocale) + { + UIDLGLOGFONT[] array = (UIDLGLOGFONT[])(object)new UIDLGLOGFONT[1]; + if (hostLocale.GetDialogFont(array) == 0) + { + Font = FontFromUIDLGLOGFONT(array[0]); + } + } + } + + private static Font FontFromUIDLGLOGFONT(UIDLGLOGFONT logFont) + { + var fonts = new char[logFont.lfFaceName.Length]; + + var num = 0; + ushort[] lfFaceName = logFont.lfFaceName; + foreach (ushort num2 in lfFaceName) + { + fonts[num++] = (char)num2; + } + + var familyName = new string(fonts); + var emSize = -logFont.lfHeight; + var fontStyle = FontStyle.Regular; + + if (logFont.lfItalic > 0) + { + fontStyle |= FontStyle.Italic; + } + if (logFont.lfUnderline > 0) + { + fontStyle |= FontStyle.Underline; + } + if (logFont.lfStrikeOut > 0) + { + fontStyle |= FontStyle.Strikeout; + } + if (logFont.lfWeight > 400) + { + fontStyle |= FontStyle.Bold; + } + + var unit = GraphicsUnit.Pixel; + var lfCharSet = logFont.lfCharSet; + + return new Font(familyName, emSize, fontStyle, unit, lfCharSet); + } + + protected void ResizeLabelDescription(Label labelDescription) + { + using Graphics graphics = CreateGraphics(); + var sizeF = graphics.MeasureString(labelDescription.Text, Font); + + int widthRatio = (int)(sizeF.Width / (float)labelDescription.Width); + if (widthRatio != 0) + { + int heightCeil = (int)Math.Ceiling(sizeF.Height); + SuspendLayout(); + labelDescription.Height = heightCeil + widthRatio * heightCeil; + ResumeLayout(performLayout: true); + } + } + } +} diff --git a/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoWasmOptions.Designer.cs b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoWasmOptions.Designer.cs new file mode 100644 index 000000000000..972b3ba02fcc --- /dev/null +++ b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoWasmOptions.Designer.cs @@ -0,0 +1,150 @@ +namespace UnoSolutionTemplate.Wizard.Forms +{ + partial class UnoWasmOptions + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonOK = new System.Windows.Forms.Button(); + this.labelDescription = new System.Windows.Forms.Label(); + this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); + this.checkManifestJson = new System.Windows.Forms.CheckBox(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel4.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonCancel.Location = new System.Drawing.Point(442, 659); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(106, 35); + this.buttonCancel.TabIndex = 10; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // buttonOK + // + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; + this.buttonOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonOK.Location = new System.Drawing.Point(327, 659); + this.buttonOK.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(106, 35); + this.buttonOK.TabIndex = 8; + this.buttonOK.Text = "Create"; + this.buttonOK.UseVisualStyleBackColor = true; + // + // labelDescription + // + this.labelDescription.AutoSize = true; + this.labelDescription.Location = new System.Drawing.Point(18, 16); + this.labelDescription.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDescription.Name = "labelDescription"; + this.labelDescription.Size = new System.Drawing.Size(420, 20); + this.labelDescription.TabIndex = 9; + this.labelDescription.Text = "Select the following options for your WebAssembly project."; + // + // flowLayoutPanel4 + // + this.flowLayoutPanel4.Controls.Add(this.checkManifestJson); + this.flowLayoutPanel4.Location = new System.Drawing.Point(4, 5); + this.flowLayoutPanel4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.flowLayoutPanel4.Name = "flowLayoutPanel4"; + this.flowLayoutPanel4.Size = new System.Drawing.Size(512, 42); + this.flowLayoutPanel4.TabIndex = 4; + // + // checkManifestJson + // + this.checkManifestJson.AutoSize = true; + this.checkManifestJson.Checked = true; + this.checkManifestJson.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkManifestJson.Location = new System.Drawing.Point(4, 5); + this.checkManifestJson.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.checkManifestJson.Name = "checkManifestJson"; + this.checkManifestJson.Size = new System.Drawing.Size(334, 24); + this.checkManifestJson.TabIndex = 1; + this.checkManifestJson.Text = "Include manifest.json file for PWA support."; + this.checkManifestJson.UseVisualStyleBackColor = true; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.flowLayoutPanel1.Controls.Add(this.flowLayoutPanel4); + this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel1.Location = new System.Drawing.Point(20, 40); + this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(520, 555); + this.flowLayoutPanel1.TabIndex = 12; + // + // UnoWasmOptions + // + this.AcceptButton = this.buttonOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSize = true; + this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.CancelButton = this.buttonCancel; + this.ClientSize = new System.Drawing.Size(567, 711); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.Controls.Add(this.labelDescription); + this.Controls.Add(this.flowLayoutPanel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(400, 200); + this.Name = "UnoWasmOptions"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.Text = "New Uno Platform App"; + this.Load += new System.EventHandler(this.UnoWasmOptions_Load); + this.flowLayoutPanel4.ResumeLayout(false); + this.flowLayoutPanel4.PerformLayout(); + this.flowLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.Label labelDescription; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4; + private System.Windows.Forms.CheckBox checkManifestJson; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + } +} diff --git a/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoWasmOptions.cs b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoWasmOptions.cs new file mode 100644 index 000000000000..18571ae34759 --- /dev/null +++ b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoWasmOptions.cs @@ -0,0 +1,23 @@ +using System; + +namespace UnoSolutionTemplate.Wizard.Forms +{ + public partial class UnoWasmOptions : UnoOptionsBaseForm + { + public bool UseManifestJson => checkManifestJson.Checked; + + public UnoWasmOptions(IServiceProvider serviceProvider) + : base(serviceProvider) + { + InitializeComponent(); + + InitializeFont(); + } + + private void UnoWasmOptions_Load(object sender, EventArgs e) + { + ResizeLabelDescription(labelDescription); + CenterToParent(); + } + } +} diff --git a/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoWasmOptions.resx b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoWasmOptions.resx new file mode 100644 index 000000000000..1af7de150c99 --- /dev/null +++ b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/Forms/UnoWasmOptions.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/UnoSolutionTemplate.Wizard.2022.csproj b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/UnoSolutionTemplate.Wizard.2022.csproj index 1f838f104418..e12a9b33ed5a 100644 --- a/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/UnoSolutionTemplate.Wizard.2022.csproj +++ b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/UnoSolutionTemplate.Wizard.2022.csproj @@ -56,6 +56,13 @@ UnoOptions.cs + + + Form + + + UnoWasmOptions.cs + @@ -70,6 +77,9 @@ UnoOptions.cs + + UnoWasmOptions.cs + diff --git a/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/UnoSolutionWizard.cs b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/UnoSolutionWizard.cs index 13fa2dbd739a..92354e5b46f8 100644 --- a/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/UnoSolutionWizard.cs +++ b/src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/UnoSolutionWizard.cs @@ -36,6 +36,7 @@ public class UnoSolutionWizard : IWizard private bool _useWpf; private bool _useWinUI; private bool _useServer; + private bool _useWebAssemblyManifestJson; private string? _baseTargetFramework; private IDictionary? _replacementDictionary; @@ -81,6 +82,12 @@ public void ProjectFinishedGenerating(Project project) if (_useWebAssembly) { GenerateProject(solution, platformsFolder, $"{_projectName}.Wasm", "Wasm.winui.net6.vstemplate"); + + if (!_useWebAssemblyManifestJson) + { + var webAssemblyManifestJsonPath = Path.Combine(_targetPath, $"{_projectName}.Wasm", "manifest.json"); + File.Delete(webAssemblyManifestJsonPath); + } } if (_useServer) @@ -268,8 +275,6 @@ public void RunStarted(object automationObject, Dictionary repla replacementsDictionary["$ext_safeprojectname$"] = replacementsDictionary["$safeprojectname$"]; replacementsDictionary["$basetargetframework$"] = _baseTargetFramework.ToString(); - _replacementDictionary = replacementsDictionary.ToDictionary(p => p.Key, p => p.Value); - var version = GetVisualStudioReleaseVersion(); if(version < new Version(17, 3) && (_useiOS || _useAndroid || _useCatalyst || _useAppKit)) @@ -282,11 +287,35 @@ public void RunStarted(object automationObject, Dictionary repla case DialogResult.Abort: MessageBox.Show("Aborted"/*targetPlatformWizardPicker.Error*/); + Directory.Delete(_targetPath, true); throw new WizardCancelledException(); default: throw new WizardBackoutException(); } + + if (_useWebAssembly) + { + using UnoWasmOptions unoWasmOptionsPicker = new UnoWasmOptions(VisualStudioServiceProvider); + + switch (unoWasmOptionsPicker.ShowDialog(owner)) + { + case DialogResult.OK: + _useWebAssemblyManifestJson = unoWasmOptionsPicker.UseManifestJson; + replacementsDictionary["$UseWebAssemblyManifestJson$"] = _useWebAssemblyManifestJson.ToString(); + break; + + case DialogResult.Abort: + MessageBox.Show("Aborted"/*targetPlatformWizardPicker.Error*/); + Directory.Delete(_targetPath, true); + throw new WizardCancelledException(); + + default: + throw new WizardBackoutException(); + } + } + + _replacementDictionary = replacementsDictionary.ToDictionary(p => p.Key, p => p.Value); } } diff --git a/src/SolutionTemplate/UnoSolutionTemplate.net6/UnoSolutionTemplate.net6.csproj b/src/SolutionTemplate/UnoSolutionTemplate.net6/UnoSolutionTemplate.net6.csproj index f3bdff786eb1..4a354c5df93e 100644 --- a/src/SolutionTemplate/UnoSolutionTemplate.net6/UnoSolutionTemplate.net6.csproj +++ b/src/SolutionTemplate/UnoSolutionTemplate.net6/UnoSolutionTemplate.net6.csproj @@ -237,6 +237,7 @@ + diff --git a/src/SolutionTemplate/UnoSolutionTemplate.net6/Wasm/UnoQuickStart.Wasm.csproj b/src/SolutionTemplate/UnoSolutionTemplate.net6/Wasm/UnoQuickStart.Wasm.csproj index ac00d558f31d..955824f8666a 100644 --- a/src/SolutionTemplate/UnoSolutionTemplate.net6/Wasm/UnoQuickStart.Wasm.csproj +++ b/src/SolutionTemplate/UnoSolutionTemplate.net6/Wasm/UnoQuickStart.Wasm.csproj @@ -4,8 +4,7 @@ Exe net6.0 NU1701 - - manifest.json + $if$($UseWebAssemblyManifestJson$ == True)manifest.json$endif$