.NET Framework not found on this machine - Windows server 2008 R2 SP1

3 visualizzazioni (ultimi 30 giorni)
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 Commento
Hyde Zhang
Hyde Zhang il 31 Dic 2020
Modificato: Hyde Zhang il 31 Dic 2020
UPDATE:
Using "0.0 — Use the latest supported version on the target machine." seems to be working fine but it seems to be the default behaviour if the compiler can't find the specified version.
Again, will be much appreciated if someone can point out how the compiler finds .Net Framework version when I use "version_major.version_minor— Use a specific version of the framework." i.e. what setup needs to be done so that the compiler finds the version specified. (Environment variable etc.)
D:\CSharpBuildTest>"C:/Program Files/MATLAB/R2017b/bin/mcc.bat" -W "dotnet:Company.Team.Product,MyClass,0.0,Private,local" -T link:lib -d "bin\csharptest" -v "class{MyClass:Export\getConfigValue.m}"
Compiler version: 6.5 (R2017b)
Dependency analysis by REQUIREMENTS.
Parsing file "D:\CSharpBuildTest\Export\getConfigValue.m"
(Referenced from: "Compiler Command Line").
Deleting 0 temporary MEX authorization files.
Generating file "bin\csharptest\MyClassNative.cs".
Generating file "bin\csharptest\MyClass.cs".
Generating file "D:\CSharpBuildTest\bin\csharptest\readme.txt".
Executing command: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /nologo /optimize /doc:"bin\csharptest\MyClass.xml" /t:library /r:"C:\Program Files\MATLAB\R2017b\toolbox\dotnetbuilder\bin\w
in64\v4.0\MWArray.dll" /resource:"bin\csharptest\MyClass.ctf" /out:"bin\csharptest\MyClass.dll" "bin\csharptest\MyClass.cs"
Executing command: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /nologo /optimize /doc:"bin\csharptest\MyClassNative.xml" /t:library /r:"C:\Program Files\MATLAB\R2017b\toolbox\dotnetbuilder
\bin\win64\v4.0\MWArray.dll" /resource:"bin\csharptest\MyClass.ctf" /out:"bin\csharptest\MyClassNative.dll" "bin\csharptest\MyClassNative.cs"
D:\CSharpBuildTest>

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su MATLAB Compiler SDK in Help Center e File Exchange

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by