You must start by creating an SQL server database project. To do that:
Procedure
On the menu bar, select File > New > Project
to open the New Project window.
In the Project types tree view, expand
Visual C# and select Database.
In the Templates area to the right,
select SQL Server Project and then enter a name
in the Name field for the project you want to
create, UDF function in this example.
Click OK to validate your changes and close
the window.
The Add Database Reference dialog box is
displayed.
From the Available References list, select
the database in which you want to create the project and then click OK to close the dialog box.
Information noteNote:
If the database you want to create the project in is not listed, you can
add it to the Available Reference list
through the Add New Reference tab.
The project is created and listed in the Data Explorer panel
to the right of the Visual Studio main window.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!