Apparently, Visual Studio 2010 doesn't work with SQL Server 2012 by default. To use it with SQL Server 2012, you have to install SQL Server Data Tools (SSDT). You can download it from here:
http://msdn.microsoft.com/en-us/data/hh297027. Once it's installed, you create a project using the SQL Server Database Project template that's displayed when you select SQL Server from the Other Languages
group of the New Project dialog box. Then, to add a CLR object, select SQL CLR C# from the Add Item dialog box and then select the type of object you want to create. After you enter the code for the object and compile it, you use the Publish command in the
Build menu to deploy it to SQL Server.