You must start by creating an SQL server database project. To do that:
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.