MATLAB: Problem with accessing C# dll files

ccompilerdllsdk

->I have a C# Dll file named ACE.dll,copied dll file to Matlab working directory(current folder),and i am using loadlibrary('ACE.dll'); syntax for loading libraries,there are no .h header file so i made my syntax loadlibrary('ACE.dll'); but i am getting an error stating
"Error using loadlibrary (line 254) A 'Selected' compiler was not found. You may need to run mex -setup.
Error in ImportDll (line 3) loadlibrary(fullpathToDll);"
->After running mex -setup, i have said 'y' to locate installed compilers,but got an error
"No supported SDK or compiler was found on this computer. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2012b/win64.html
Error using mex (line 206) Unable to complete successfully."
->Both Dll and Matlab are with 64 bit only, I have installed VS Express 2013 for desktop. checked SDK version and having v7.1A and above until v8.1A.
What could be the reason? how can i access dll files? please help.

Best Answer

Hi,
if you have a C# dll I guess it's not a usual Windows dll but a .NET assembly? In this case you would need to use
NET.addAssembly
instead of loadlibrary to import the dll to MATLAB.
Titus