error after build the project using deploytool

3 views (last 30 days)
Siti on 18 Oct 2013
Answered: Yatin on 7 Nov 2013
i get an error after build the project using deploytool , save as .net application. the error is when i open .html file in the package.
it says
MagicSquareComp Assembly Description
This assembly was created using MATLAB Builder NE. The public class methods included in this assembly allow access to the M functions specified during compilation.
IMPORTANT: What you need to use this assembly successfully:
MATLAB Compiler Runtime (MCR)
MCR is a collection of native libraries that are required to execute the MATLAB functions. Consequently, the MCR must be installed on any machine that runs a MATLAB Builder NE generated component. If you install MATLAB, MATLAB Compiler or MATLAB Builder NE, you have access to the MCR automatically. Otherwise, you must install the MCR by running the MCRInstaller executable. Note: This assembly is only compatible with version 8.1 of the MCR.
Please contact the provider of this assembly for specific details about the MCR.
This assembly, which can be found in $MCR \toolbox\dotnetbuilder\bin\[win32|Win64]\v2.0, provides classes that act as the bridge between your application and the MCR. Note: The MagicSquareComp assembly, generated by MATLAB Builder NE, will only work with an MWArray assembly that was built against the same version of the MCR.
The MWArray class hierarchy provides methods to create and access the MATLAB data types used by the MCR. All of the classes derive from the abstract MWArray class and each of the derived classes, with the exception of MWIndexArray which is also abstract, maps to a MATLAB data type. The data conversion class hierarchy includes; MWNumericArray, MWLogicalArray, MWCharArray, MWStructArray, and MWCellArray. Each class has properties and methods that can be used to query various attributes of the class such as the number of dimensions, dimension size, element size, field names etc.
These classes can be explicitly instantiated and used as arguments to the MATLAB Builder NE generated class methods. Where applicable, a native .NET primitive or array type can also be used as an input parameter that will be implicitly converted to the appropriate MWArray type.

Answers (1)

Yatin on 7 Nov 2013
Hi Siti,
As per the description of the error, you need to install the MCR(Matlab Compiler Runtime) on your system in order for the assembly to work. The MCR can be downloaded from the link below:
Assuming that you are on a Windows machine, you will have to set the MCR, first, on the windows PATH environment variable. You can have a look at the link below for doing the same.
Once you have done that, in your Visual Studio project you will need to provide a reference to your deployable component (MagicSqaure) in this case and then you will also need to provide a reference to the MWArray.dll file in the MCR folder inder the toolbox\dotnetbuilder\bin\<win32|win64>\<version>\MWArray.dll MWArray.dll has all the required libraries that you will need to interact with the MATLAB code packaged in your deloyable.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by