How to use DLL with Ax 2012 visual studio 2010 create a new C# project in that open class library write the following code

using System.Text;

namespace AXCS


public class TestingMyDLL1


public string Greet(string name)


return “Hello ” + name;




2.Bulid the solution

3.go visualstudio projects—> copy dll files

4.program files(X84)–>microsoft dynamics—>client—>bin—> paste    Dll files AOT–>go referencess —>.add reference–> add that dll files

6.Go to jobs–> Add new job write that following code

static void John_DllTest(Args _args)
JohnTestClassLibrary.TestingMyDLL1 testingDll;

InteropPermission permission;

str s;



permission = new InteropPermission(InteropKind::DllInterop);


testingDll = new JohnTestClassLibrary.TestingMyDLL1();

s = testingDll.Greet(“Johnkrish The Great”);





error(‘Error executing DLL code’);




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s