NET.addAssembly
Make .NET assembly visible to MATLAB
Syntax
Description
loads a Base Class Library (BCL) or an assembly installed in the Global Assembly Cache (GAC)
(.NET Framework only).asmInfo = NET.addAssembly(globalName)
loads a private .NET assembly.asmInfo = NET.addAssembly(privateName)
lets you opt-in to unload a private, .NET Core assembly. To unload an assembly, set the
asmInfo = NET.addAssembly(___,Unloadable=tf)Unloadable parameter to true when you call
NET.addAssembly, then call NET.unloadAssembly. (since R2026a)
You cannot unload a .NET Framework assembly. If you modify and rebuild a .NET Framework assembly, you must restart MATLAB® to access the updated code.
Examples
Input Arguments
Output Arguments
Limitations
NET.addAssemblydoes not support assemblies generated by the MATLAB Compiler SDK™ product.
Tips
You do not need to call
NET.addAssemblyto access classes in themscorlib.dllandsystem.dllassemblies. MATLAB dynamically loads these assemblies from the .NET class library the first time you type "NET." or "System.".Refer to your .NET product documentation for the name of the assembly and its deployment type (global or private).