From a66cbdc037cea9dbfb7cab986b98eccc1d6607ba Mon Sep 17 00:00:00 2001 From: Erik Ejlskov Jensen Date: Wed, 1 Jan 2025 13:15:44 +0100 Subject: [PATCH] Udpate templates --- .../inlinefunc/.template.config/template.json | 22 +++++++++++++++- .../scalarfunc/.template.config/template.json | 22 +++++++++++++++- .../sproc/.template.config/template.json | 22 +++++++++++++++- .../table/.template.config/template.json | 2 +- .../tablefunc/.template.config/template.json | 22 +++++++++++++++- .../templates/templates.sln | 25 ------------------- .../uddt/.template.config/template.json | 22 +++++++++++++++- .../udtt/.template.config/template.json | 22 +++++++++++++++- .../view/.template.config/template.json | 22 +++++++++++++++- 9 files changed, 148 insertions(+), 33 deletions(-) delete mode 100644 src/MSBuild.Sdk.SqlProj.Templates/templates/templates.sln diff --git a/src/MSBuild.Sdk.SqlProj.Templates/templates/inlinefunc/.template.config/template.json b/src/MSBuild.Sdk.SqlProj.Templates/templates/inlinefunc/.template.config/template.json index 6157f73b..99f3b08b 100644 --- a/src/MSBuild.Sdk.SqlProj.Templates/templates/inlinefunc/.template.config/template.json +++ b/src/MSBuild.Sdk.SqlProj.Templates/templates/inlinefunc/.template.config/template.json @@ -6,9 +6,29 @@ "name": "Inline function", "shortName": "inlinefunc", "tags": { - "language": "SQL", + "language": "C#", "type": "item" }, + "primaryOutputs": [ + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "Function1.sql" + } + ], + "postActions": [ + { + "id": "openInEditor", + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Function1.sql in the editor.", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "args": { + "files": "0" + }, + "continueOnError": true + } + ], + "defaultName": "Function1", "sourceName": "Function1", "symbols": { "schemaName": { diff --git a/src/MSBuild.Sdk.SqlProj.Templates/templates/scalarfunc/.template.config/template.json b/src/MSBuild.Sdk.SqlProj.Templates/templates/scalarfunc/.template.config/template.json index bcbe8567..5716af50 100644 --- a/src/MSBuild.Sdk.SqlProj.Templates/templates/scalarfunc/.template.config/template.json +++ b/src/MSBuild.Sdk.SqlProj.Templates/templates/scalarfunc/.template.config/template.json @@ -6,9 +6,29 @@ "name": "Scalar Function", "shortName": "scalarfunc", "tags": { - "language": "SQL", + "language": "C#", "type": "item" }, + "primaryOutputs": [ + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "Function1.sql" + } + ], + "postActions": [ + { + "id": "openInEditor", + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Function1.sql in the editor.", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "args": { + "files": "0" + }, + "continueOnError": true + } + ], + "defaultName": "Function1", "sourceName": "Function1", "symbols": { "schemaName": { diff --git a/src/MSBuild.Sdk.SqlProj.Templates/templates/sproc/.template.config/template.json b/src/MSBuild.Sdk.SqlProj.Templates/templates/sproc/.template.config/template.json index 16497bb9..c6ff2330 100644 --- a/src/MSBuild.Sdk.SqlProj.Templates/templates/sproc/.template.config/template.json +++ b/src/MSBuild.Sdk.SqlProj.Templates/templates/sproc/.template.config/template.json @@ -6,9 +6,29 @@ "name": "Stored procedure", "shortName": "sproc", "tags": { - "language": "SQL", + "language": "C#", "type": "item" }, + "primaryOutputs": [ + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "Procedure1.sql" + } + ], + "postActions": [ + { + "id": "openInEditor", + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Procedure1.sql in the editor.", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "args": { + "files": "0" + }, + "continueOnError": true + } + ], + "defaultName": "Procedure1", "sourceName": "Procedure1", "symbols": { "schemaName": { diff --git a/src/MSBuild.Sdk.SqlProj.Templates/templates/table/.template.config/template.json b/src/MSBuild.Sdk.SqlProj.Templates/templates/table/.template.config/template.json index 48e131ac..ab95fc3e 100644 --- a/src/MSBuild.Sdk.SqlProj.Templates/templates/table/.template.config/template.json +++ b/src/MSBuild.Sdk.SqlProj.Templates/templates/table/.template.config/template.json @@ -28,8 +28,8 @@ "continueOnError": true } ], - "sourceName": "Table1", "defaultName": "Table1", + "sourceName": "Table1", "symbols": { "schemaName": { "type": "parameter", diff --git a/src/MSBuild.Sdk.SqlProj.Templates/templates/tablefunc/.template.config/template.json b/src/MSBuild.Sdk.SqlProj.Templates/templates/tablefunc/.template.config/template.json index d568e62b..6184dfe0 100644 --- a/src/MSBuild.Sdk.SqlProj.Templates/templates/tablefunc/.template.config/template.json +++ b/src/MSBuild.Sdk.SqlProj.Templates/templates/tablefunc/.template.config/template.json @@ -6,9 +6,29 @@ "name": "Table-valued Function", "shortName": "tablefunc", "tags": { - "language": "SQL", + "language": "C#", "type": "item" }, + "primaryOutputs": [ + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "Function1.sql" + } + ], + "postActions": [ + { + "id": "openInEditor", + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens Function1.sql in the editor.", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "args": { + "files": "0" + }, + "continueOnError": true + } + ], + "defaultName": "Function1", "sourceName": "Function1", "symbols": { "schemaName": { diff --git a/src/MSBuild.Sdk.SqlProj.Templates/templates/templates.sln b/src/MSBuild.Sdk.SqlProj.Templates/templates/templates.sln deleted file mode 100644 index bb48f962..00000000 --- a/src/MSBuild.Sdk.SqlProj.Templates/templates/templates.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.002.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "sqlproj", "sqlproj\sqlproj.csproj", "{D7B607D9-35B8-44BE-9F5E-7BC3B70AD67F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D7B607D9-35B8-44BE-9F5E-7BC3B70AD67F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D7B607D9-35B8-44BE-9F5E-7BC3B70AD67F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D7B607D9-35B8-44BE-9F5E-7BC3B70AD67F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D7B607D9-35B8-44BE-9F5E-7BC3B70AD67F}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {68710C93-6311-452D-9B8F-05DEAECF82BB} - EndGlobalSection -EndGlobal diff --git a/src/MSBuild.Sdk.SqlProj.Templates/templates/uddt/.template.config/template.json b/src/MSBuild.Sdk.SqlProj.Templates/templates/uddt/.template.config/template.json index 27b964da..ff772886 100644 --- a/src/MSBuild.Sdk.SqlProj.Templates/templates/uddt/.template.config/template.json +++ b/src/MSBuild.Sdk.SqlProj.Templates/templates/uddt/.template.config/template.json @@ -6,9 +6,29 @@ "name": "User-defined data type", "shortName": "uddt", "tags": { - "language": "SQL", + "language": "C#", "type": "item" }, + "primaryOutputs": [ + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "UserDefinedDataType1.sql" + } + ], + "postActions": [ + { + "id": "openInEditor", + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens UserDefinedDataType1.sql in the editor.", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "args": { + "files": "0" + }, + "continueOnError": true + } + ], + "defaultName": "UserDefinedDataType1", "sourceName": "UserDefinedDataType1", "symbols": { "schemaName": { diff --git a/src/MSBuild.Sdk.SqlProj.Templates/templates/udtt/.template.config/template.json b/src/MSBuild.Sdk.SqlProj.Templates/templates/udtt/.template.config/template.json index e03768d2..c248b81c 100644 --- a/src/MSBuild.Sdk.SqlProj.Templates/templates/udtt/.template.config/template.json +++ b/src/MSBuild.Sdk.SqlProj.Templates/templates/udtt/.template.config/template.json @@ -6,9 +6,29 @@ "name": "User-defined table type", "shortName": "udtt", "tags": { - "language": "SQL", + "language": "C#", "type": "item" }, + "primaryOutputs": [ + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "UserDefinedTableType1.sql" + } + ], + "postActions": [ + { + "id": "openInEditor", + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens UserDefinedTableType1.sql in the editor.", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "args": { + "files": "0" + }, + "continueOnError": true + } + ], + "defaultName": "UserDefinedTableType1", "sourceName": "UserDefinedTableType1", "symbols": { "schemaName": { diff --git a/src/MSBuild.Sdk.SqlProj.Templates/templates/view/.template.config/template.json b/src/MSBuild.Sdk.SqlProj.Templates/templates/view/.template.config/template.json index f611f64a..0a103480 100644 --- a/src/MSBuild.Sdk.SqlProj.Templates/templates/view/.template.config/template.json +++ b/src/MSBuild.Sdk.SqlProj.Templates/templates/view/.template.config/template.json @@ -6,9 +6,29 @@ "name": "Database view", "shortName": "view", "tags": { - "language": "SQL", + "language": "C#", "type": "item" }, + "primaryOutputs": [ + { + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "path": "View1.sql" + } + ], + "postActions": [ + { + "id": "openInEditor", + "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", + "description": "Opens View1.sql in the editor.", + "manualInstructions": [], + "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", + "args": { + "files": "0" + }, + "continueOnError": true + } + ], + "defaultName": "View1", "sourceName": "View1", "symbols": { "schemaName": {