.NET Framework not found on this machine - Windows server 2008 R2 SP1
Show older comments
Hi,
I am trying to build .Net Assembly with:
.Net Framework 4.6.2 (actual version from csc.exe is 4.6.1590)
Matlab Compiler 6.5. (R2017b)
Windows server 2008 R2 SP1.

The machine has .Net Framework v3.5.1 pre-install since it's Windows server 2008, but doesn't matter what I put in as framework version (tried 4.6, 4.6.2, 4.6.1 and 4.6.1590)
"C:/Program Files/MATLAB/R2017b/bin/mcc.bat" -W "dotnet:Company.Team.Product,MyClass,4.6.2,Private,local" -T link:lib -d "bin\csharp" -v "class{MyClass:Export\getConfigValue.m}"
It keeps on saying after generating readme.txt:
Invalid .NET framework.
The specified framework either was not found or is not currently supported.
However it can proceed further with any 3.5.x as framework value but it doesn't seems to be able to actually find 3.5 since that it went into v4.0 folder to execute csc regardless of framework version I put in
Executing command: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /nologo /optimize /doc:"bin\csharp\Product.xml" /t:library /r:"C:\Program Files\MATLAB\R2017b\toolbox\dotnetbuilder\bin\win64
\v4.0\MWArray.dll" /resource:"bin\csharp\Product.ctf" /out:"bin\csharp\Product.dll" "bin\csharp\MyClass.cs"
Warning: .NET Framework v3.5 not found on this machine.
Compatible component will be built using v2.0 compiler.
There's no documentation anywhere about how the compiler or mcc detect .Net Framework version and the csc.exe location.
I have to work with Windows server 2008 R2 SP1.
Any insight or suggestions are much appreciated !
Thanks.
1 Comment
Hyde Zhang
on 31 Dec 2020
Edited: Hyde Zhang
on 31 Dec 2020
Answers (0)
Categories
Find more on MATLAB Compiler SDK in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!