27 September 2004 06:48 nielsb

Approved SQLCLR framework class libraries and the VS IDE


In Bob's post - SQLCLR - List of approved framework class libraries, he discusses how he found, in an unusual way, the list of allowed framework libraries (which BTW is not 100% correct - see below), and subsequently a shortcoming in the VS IDE. 

So what he found out was that when you use the SQL Server project type to create SQLCLR assemblies - you can only add references to the allowed system dlls or other SQL Server project dll's . You can NOT add references to, for example, ordinary class library project dll's. That sux big time, and that's why I rarely use the SQL Server Project type when developing against SQL Server 2005!!

However the other day I came across a way around the problem:

  • Open Object Browser (View | Object Browser or Ctrl+Alt+J), and Browse for the component(s) you are interested in.
  • In Solution Explorer select the project you want to add the references to.
  • Finally, for each of the dll's you are interested in, in Object Explorer; click on the "Add to References in Selected Project in Solution Explorer" icon on the Object Browser tool-bar.

That should do it. I really hope this will be fixed in a future release of the IDE.

Oh, and finally: even though you may think that all the system dll's you can see in the "Add References" dialog for a SQL Server Project are on the allowed list; they are not! System.Runtime.Remoting.dll can be added, but SQL Server does not allow that dll to be registered.


Comments

No Comments