From 51af08aee628f58e579cc3b9907d74ca86b83f9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=87=E9=80=B8?= Date: Tue, 9 Apr 2019 22:13:59 +0800 Subject: [PATCH 1/2] Add Visual Basic template --- .../.template.config/dotnetcli.host.json | 24 ++++ .../.template.config/template.json | 86 +++++++++++++ .../Company.WinFormsApplication1.vbproj | 19 +++ .../Form1.Designer.vb | 31 +++++ .../Form1.resx | 120 ++++++++++++++++++ .../WinFormsApplication-VisualBasic/Form1.vb | 3 + .../xlf/Form1.cs.xlf | 6 + .../xlf/Form1.de.xlf | 6 + .../xlf/Form1.es.xlf | 6 + .../xlf/Form1.fr.xlf | 6 + .../xlf/Form1.it.xlf | 6 + .../xlf/Form1.ja.xlf | 6 + .../xlf/Form1.ko.xlf | 6 + .../xlf/Form1.pl.xlf | 6 + .../xlf/Form1.pt-BR.xlf | 6 + .../xlf/Form1.ru.xlf | 6 + .../xlf/Form1.tr.xlf | 6 + .../xlf/Form1.zh-Hans.xlf | 6 + .../xlf/Form1.zh-Hant.xlf | 6 + 19 files changed, 361 insertions(+) create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/.template.config/dotnetcli.host.json create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/.template.config/template.json create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Company.WinFormsApplication1.vbproj create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Form1.Designer.vb create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Form1.resx create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Form1.vb create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.cs.xlf create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.de.xlf create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.es.xlf create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.fr.xlf create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.it.xlf create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.ja.xlf create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.ko.xlf create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.pl.xlf create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.pt-BR.xlf create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.ru.xlf create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.tr.xlf create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.zh-Hans.xlf create mode 100644 pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.zh-Hant.xlf diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/.template.config/dotnetcli.host.json b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/.template.config/dotnetcli.host.json new file mode 100644 index 00000000000..22ab4a3929f --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/.template.config/dotnetcli.host.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "TargetFrameworkOverride": { + "isHidden": "true", + "longName": "target-framework-override", + "shortName": "" + }, + "Framework": { + "longName": "framework" + }, + "skipRestore": { + "longName": "no-restore", + "shortName": "" + }, + "langVersion": { + "longName": "langVersion", + "shortName": "" + } + }, + "usageExamples": [ + "" + ] +} diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/.template.config/template.json b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/.template.config/template.json new file mode 100644 index 00000000000..2a65e0a1c30 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/.template.config/template.json @@ -0,0 +1,86 @@ +{ + "$schema": "http://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Common", "WinForms"], + "name": "Windows Forms (WinForms) Application", + "generatorVersions": "[1.0.0.0-*)", + "description": "A project for creating a .NET Core Windows Forms (WinForms) Application", + "groupIdentity": "Microsoft.Common.WinForms", + "precedence": "3000", + "identity": "Microsoft.Common.WinForms", + "shortName": "winforms", + "tags": { + "language": "VB", + "type": "project" + }, + "sourceName": "Company.WinFormsApplication1", + "preferNameDirectory": true, + "symbols": { + "TargetFrameworkOverride": { + "type": "parameter", + "description": "Overrides the target framework", + "replaces": "TargetFrameworkOverride", + "datatype": "string", + "defaultValue": "" + }, + "Framework": { + "type": "parameter", + "description": "The target framework for the project.", + "datatype": "choice", + "choices": [ + { + "choice": "netcoreapp3.0", + "description": "Target netcoreapp3.0" + } + ], + "replaces": "netcoreapp3.0", + "defaultValue": "netcoreapp3.0" + }, + "langVersion": { + "type": "parameter", + "datatype": "text", + "description": "Sets langVersion in the created project file", + "defaultValue": "", + "replaces": "$(ProjectLanguageVersion)" + }, + "HostIdentifier": { + "type": "bind", + "binding": "HostIdentifier" + }, + "skipRestore": { + "type": "parameter", + "datatype": "bool", + "description": "If specified, skips the automatic restore of the project on create.", + "defaultValue": "false" + } + }, + "primaryOutputs": [ + { "path": "Company.WinFormsApplication1.vbproj" }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "Form1.vb" + } + ], + "defaultName": "WinFormsApp1", + "postActions": [ + { + "condition": "(!skipRestore)", + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [ + { "text": "Run 'dotnet restore'" } + ], + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "continueOnError": true + }, + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Form1.vb in the editor", + "manualInstructions": [ ], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "args": { + "files": "1" + }, + "continueOnError": true + } + ] +} diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Company.WinFormsApplication1.vbproj b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Company.WinFormsApplication1.vbproj new file mode 100644 index 00000000000..4c54d1a376e --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Company.WinFormsApplication1.vbproj @@ -0,0 +1,19 @@ + + + + WinExe + netcoreapp3.0 + TargetFrameworkOverride + Company.WinFormsApplication1 + Company.WinFormsApplication1.Form1 + $(ProjectLanguageVersion) + true + + + + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Form1.Designer.vb b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Form1.Designer.vb new file mode 100644 index 00000000000..a418df0ea8d --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Form1.Designer.vb @@ -0,0 +1,31 @@ + _ +Partial Class Form1 + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + components = New System.ComponentModel.Container() + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Text = "Form1" + End Sub + +End Class diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Form1.resx b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Form1.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Form1.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/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Form1.vb b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Form1.vb new file mode 100644 index 00000000000..17d659563f3 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/Form1.vb @@ -0,0 +1,3 @@ +Public Class Form1 + +End Class diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.cs.xlf b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.cs.xlf new file mode 100644 index 00000000000..aa40faef86f --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.cs.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.de.xlf b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.de.xlf new file mode 100644 index 00000000000..caab0ce76f7 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.de.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.es.xlf b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.es.xlf new file mode 100644 index 00000000000..37761f811ce --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.es.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.fr.xlf b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.fr.xlf new file mode 100644 index 00000000000..366eb9d5436 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.fr.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.it.xlf b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.it.xlf new file mode 100644 index 00000000000..e68d3fe2676 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.it.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.ja.xlf b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.ja.xlf new file mode 100644 index 00000000000..2943ecce294 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.ja.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.ko.xlf b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.ko.xlf new file mode 100644 index 00000000000..83cb763b8f6 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.ko.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.pl.xlf b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.pl.xlf new file mode 100644 index 00000000000..58b6edd6da0 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.pl.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.pt-BR.xlf b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.pt-BR.xlf new file mode 100644 index 00000000000..073f6c00557 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.pt-BR.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.ru.xlf b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.ru.xlf new file mode 100644 index 00000000000..5d784e2bc56 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.ru.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.tr.xlf b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.tr.xlf new file mode 100644 index 00000000000..9ae0ede5336 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.tr.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.zh-Hans.xlf b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.zh-Hans.xlf new file mode 100644 index 00000000000..2dbdc8d0ce3 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.zh-Hans.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.zh-Hant.xlf b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.zh-Hant.xlf new file mode 100644 index 00000000000..8782e525d98 --- /dev/null +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/xlf/Form1.zh-Hant.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 00bf875f9b16f097e5a1eb235c8be45e927053e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=87=E9=80=B8?= Date: Tue, 9 Apr 2019 23:41:40 +0800 Subject: [PATCH 2/2] Template identity & move templates to content --- .../Microsoft.Dotnet.Winforms.ProjectTemplates.csproj | 3 +-- .../.template.config/template.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/Microsoft.Dotnet.Winforms.ProjectTemplates.csproj b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/Microsoft.Dotnet.Winforms.ProjectTemplates.csproj index 9c3f4ceed31..e7aae034088 100644 --- a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/Microsoft.Dotnet.Winforms.ProjectTemplates.csproj +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/Microsoft.Dotnet.Winforms.ProjectTemplates.csproj @@ -41,8 +41,7 @@ - - .\ + .\content\ true diff --git a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/.template.config/template.json b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/.template.config/template.json index 2a65e0a1c30..f30b7c910b8 100644 --- a/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/.template.config/template.json +++ b/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/content/WinFormsApplication-VisualBasic/.template.config/template.json @@ -7,7 +7,7 @@ "description": "A project for creating a .NET Core Windows Forms (WinForms) Application", "groupIdentity": "Microsoft.Common.WinForms", "precedence": "3000", - "identity": "Microsoft.Common.WinForms", + "identity": "Microsoft.Common.WinForms.VisualBasic.3.0", "shortName": "winforms", "tags": { "language": "VB",