Opusretis
asked on
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.
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);
}
};
ASKER
@APoPhySpt
No these are basics in "normal" projects. I have a CLR stored User defined Function for SQL Server.
No these are basics in "normal" projects. I have a CLR stored User defined Function for SQL Server.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://blogs.thesitedoctor.co.uk/tim/2007/02/13/ImportingReferencing+DLLs+In+Visual+Studio.aspx