Strong named Assembly versions of MathWorks.​MATLAB.Run​time.dll and MathWorks.​MATLAB.Typ​es.dll

10 visualizzazioni (ultimi 30 giorni)
I want to build a C# Dll from my Matlab code by using the
compiler.build.dotNETAssembly()
function. I then use a script to change the created *.csproj and finally build the Dll with the dotnet build command. The integration in C# works well by following the example on this page: https://de.mathworks.com/help/compiler_sdk/dotnet/deploy-matlab-handle-subclass-to-dotnet.html
However, this only works, if no strong named assemblies are built.
If I try to build strongly named assembly, my C# application won't work, as the both Dll's Mathworks.MATLAB.Types.dll and MathWorks.MATLAB.Runtime.dll are no strong named assemblies.
The following error message appears:
Could not load file or assembly ... or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
There is a way to dissasemble the Dll's and assembale them again with a key file, so that they are strong named assemblies. However, I don't know if this is allowed, according to the license aggreement of MATLAB?
Is there any other way to built a strong named assembly?

Risposta accettata

Arijeet
Arijeet il 3 Set 2025
Hi Florian,
I understand you are trying to build a strongly named assembly from your MATLAB code. While standard assemblies work fine, strong naming fails because the required MATLAB runtime DLLs are not strongly named, and you want a solution that does not violate the MATLAB license agreement.
According to the license agreement of MATLAB, it is not possible to modify or re-sign MathWorks-provided assemblies, as shown in the image below (you can find the license agreement in the license_agreement.txt file in your MATLAB installation directory).
To the best of my knowledge, there is no direct workaround for this limitation. You might consider contacting MathWorks technical support to submit an enhancement request that would allow the option of building strong-named assemblies in the future.
Hope this helps.

Più risposte (0)

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti


Release

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by