SQL Server Project reference

Hi,

I have created a SQL Server Project. I added reference to an assembly that was already registered in SQL Server. I was successful in adding the reference, but when I try to import that assembly in my C# code, it is not available. I cannot import that assembly with the 'using' keyword.

Can anyone help me with this

P.S: The assembly that I registered in the SQL Server has 'Unsafe' access(this is shown as Unrestricted in the references tab)

Thanks,
Prakash


Answer this question

SQL Server Project reference

  • Praval Rastogi

    I tried this (with and without a namespace) and it worked fine for me.

    Things you can check:
    1. If there is no namespace then you dont need to use 'using' you can directly use the class once you add the reference.
    2. Once you add the reference make sure that it shows up under references in solution explorer.
    3. If it does show under the references in solution explorer, open object browser (view -> object browser) and see if you can explorer the assembly you added as a reference.

    If all of this work and still you are not able to add the namespace defined in the referenced assembly in using block, please send me your code.

    Thanks,
    -Vineet.

  • SQL Server Project reference