How can I import a third party .net dll into my CLR Function?

I need to import a dll into my clr function. Because early import is not supported I try to late import my DLL:
If I try to deploy I get an error without error Nr. The Message is (translatet from German):
Fehler beim Erstellen.
Error while build - but not more.
using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
using System.Runtime.InteropServices;
 

public partial class UserDefinedFunctions
{
    [DllImport(@"c:\temp\my.dll")]
    public static extern string DoSomething(string something);

    [Microsoft.SqlServer.Server.SqlFunction]
    public static SqlString Go(string myString)
    {
        string plain = DoSomething(myString);
        return new SqlString(plain);
    }
};

Open in new window

OpusretisAsked:
Who is Participating?
 
APoPhySptCommented:
don't know if this is really what you are looking for, but thought I'd give it a try:

http://blogs.thesitedoctor.co.uk/tim/2007/02/13/ImportingReferencing+DLLs+In+Visual+Studio.aspx
0
 
OpusretisAuthor Commented:
@APoPhySpt

No these are basics in "normal" projects. I have a CLR stored User defined Function for SQL Server.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.