This enhancement has been incorporated in Release 2009a (R2009a). For previous product releases, read below for any possible workarounds.
There are two possible cases:
1. If you already have the assembly:
The assembly should be COM visible to interface with MATLAB. This can be done by generating the Type-Library using the 'tlbexp.exe' utility, which comes with the Microsoft .NET Framework SDK. This utility can be found under the installation directory of MS Visual Studio, for example, 'C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0'.
To create the Type-Library, follow these steps:
1. Click on 'Start->Programs->.NET Framework SDK->SDK Command Prompt'.
2. Bring your C# DLL to this folder. Now execute:
tlbexp myDLL.dll /out:myDLL.tlb
3. To deploy the DLL, register it using the 'regasm' utility, which comes with Microsoft .NET Framework, for example, under 'C:\WINNT\Microsoft.NET\Framework\v2.0.50727' :
regasm /codebase myDLL.dll /tlb:myDLL.tlb
2. If you are about to write code to generate the assembly:
Ensure that the assembly is COM compliant. For example, Microsoft Visual Studio gives the option to configure the generated assembly to be 'COM Visible'. This should automatically generate the required Type-Library when the assembly is built. When deploying the assembly, make sure that it is registered using the 'regasm' utility with '/codebase' option as in (1) above.
For more information on 'regasm' refer to:
To interface the assembly with MATLAB, use the ACTXSERVER command: