Deploy to .NET Applications Using MATLAB Data API for .NET
MATLAB Compiler SDK™ API for .NET provides an interface between .NET applications and MATLAB code deployed within those applications. This API enables .NET applications to launch MATLAB Runtime instances and evaluate deployed MATLAB functions with arguments. The API supports asynchronous task execution for MATLAB library calls, and leverages modern .NET constructs for writing streamlined application code.
MATLAB Compiler SDK API for .NET uses the MATLAB Data API for .NET to handle the data exchange between a .NET application and deployed MATLAB code. For details, see Call MATLAB from .NET.
All .NET applications created using MATLAB Compiler SDK API for .NET and MATLAB Data API for .NET can be developed and published across Windows®, Linux®, and macOS platforms. This means it's possible to develop on any one of these platforms and publish to any of the other two. (since R2023a)
Functions
compiler.build.dotNETAssembly | Create .NET assembly for deployment outside MATLAB (Since R2021a) |
compiler.build.DotNETAssemblyOptions | Options for building .NET assemblies (Since R2021a) |
compiler.build.Results | Compiler build results object (Since R2020b) |
compiler.package.installer | Create an installer for files generated by MATLAB Compiler (Since R2020a) |
compiler.package.InstallerOptions | Options for creating MATLAB Compiler package installers (Since R2020a) |
Classes
Topics
Requirements
- MATLAB Compiler SDK .NET Target Requirements
Refer to the software requirements for using MATLAB Compiler SDK to create .NET assemblies. - Set Up .NET Development Environment
Set up development environment to develop .NET applications containing deployed MATLAB code. - Choose .NET Deployment Option
Explore .NET deployment options that MATLAB Compiler SDK offers and select the right one for your specific .NET integration needs. - Summary of MATLAB Compiler SDK .NET APIs
Explore the various MATLAB Compiler SDK .NET APIs.
Create, Integrate, and Publish
- Deploy MATLAB Function to .NET Application Using MATLAB Data API for .NET
Learn how to package and deploy a MATLAB function to a .NET application written in C#. - Deploy MATLAB Classes to .NET Application Using MATLAB Data API for .NET
Learn how to package and deploy MATLAB classes to a .NET application written in C#. - Deploy MATLAB Class That Inherits from MATLAB Handle Class
Learn how to package and deploy a MATLAB class that inherits from the MATLAB handle class to a .NET application written in C#. - Deploy MATLAB Function That Accepts Cell Array as Input Argument to .NET Application
Learn how to package and deploy a MATLAB function accepting a cell array as input into a .NET application written in C#. - Deploy MATLAB Function That Accepts Struct Array as Input Argument to .NET Application
Learn how to package and deploy a MATLAB function accepting a struct array as input into a .NET application written in C#. - Create Sample Code to Call Exported Function
Generate sample code in C++, .NET, Java®, or Python® by including sample files during packaging. - Code Archive, C# Wrapper Files, and .NET Assembly File Placement
Explore options for positioning the code archive (.ctf
file), C# wrapper files, and assembly files in an accessible location prior to building and running .NET executable.
Data Mapping
- Pass .NET Data Types to MATLAB Functions
Convert .NET data to MATLAB data. - Handle MATLAB Data in .NET Applications
Convert MATLAB data to .NET data. - Data Type Mappings Between .NET and Strongly Typed MATLAB Code
Map .NET and MATLAB data types when using strongly typed MATLAB code. - Mapping MATLAB Classes and Functions to C#
Learn how MATLAB classes and function map to a C# code files when deployed using the MATLAB Data API for .NET.