If you are trying to compile Matlab into .Net framework, you might encounter this message, even though you have the .Net framework installed:
Invalid .NET Framework. Either the specified framework was not found or is not currently supported.
This error is very misleading, because most of the time, developers are smart enough to install .Net framework before trying to compile Matlab library into .Net component. The reason why-- despite that you already have .Net framework installed-- this message comes up is because of the way you specify your mcc build compilation parameter.
'mcc -d ' dnetdir ' -W ''dotnet:dotnet,dotnetclass,1.0,private'' -T link:lib ' mfile
The above command won't work if you don't have .Net framework 1.0 installed. This is because Matlab allows you to specify the .Net framework version (1.0) after you specify your class name(dotnetclass). And by setting the value to be 1.0 you are compiling against .Net framework 1.0 which simply doesn't exist on modern developer machine.