I opened a SQL script in Visual Studio containing template parameters (as they are used by SSMS usually), but Visual Studio seems to ignore them.
Some background:
In SQL Server Management Studio (SSMS), I can prepare a T-SQL script as follows and then press Ctrl+Shift+M to open a dialog, where I can enter values for the variables (syntax is: <Name, Datatype, default> as described here, and here is a more detailed description how template parameters can be used):
Example:
DECLARE @UserLastName NVARCHAR(max)='<Last name,nvarchar(max),>';
Here, the <...> bracket expressions will be replaced by the values you entered in the dialog. If you type Doe and click OK in the dialog, you will get
DECLARE @UserLastName NVARCHAR(max)='Doe';
inserted into the script afterwards. This is quite useful if you create scripts for repetitive manual tasks, because you can type the values into the dialog and get a running script for that case.
Instead of the keyboard shortcut, you can use the menu option
The issue:
I tried to do the same in Visual Studio 2017, where I have installed Microsoft SQL Server Data Tools. But the keyboard shortcut does not work there, and there seems to be no such menu option.
Do you know how to invoke this dialog in Visual Studio?


.ttfile to use theTextTemplatingFileGeneratorcustom tool, and use anoutputdirective to produce a file with a.sqlextension). But this is academic since I presume you want to supply the template values manually, and not as part of a build step.