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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.