Which mscorlib is being used?

Hello,

I am having issues with Unity not compiling some of my c# scripts because they are trying to use functions like ‘DateTime.Kind’ and ‘Int32.TryParse’. I have been trying to figure out why and as of yet have no solution.

I have been looking in the unity directory and there are 2 sub directories:

  • Mono.framework
  • MonoiPhone.framework
    The example property and function I mentioned above can be found within the mscorlib.dll in the Mono.framework directory but not the mscorlib.dll in the MonoiPhone.framework directory. I have seen the ‘iPhone Stripping Level’ property but this has a value of disabled, so I thought that it would be using the full version of the dll’s.

If I am unable to use the Kind property of the DateTime structure, how am I meant to detect whether a DateTime is in UTC or Local?

The exclusion of the TryParse function is also somewhat annoying. How do I parse a string without exceptions being thrown when formats are wrong? This is where the try parse was helpful because it would return a boolean if it succeeded and the value within an out parameter, unless of course if the try parse did exception handling within it?

If anyone has any helpful information as to my question, it would be much appreciated.

Thanks

The used .NET version for iPhone is .NET 1.1

That will likely explain any / many / all language related problems.

As for why mscorlib is beeing used: because you otherwise wouldn’t have scripting support. Scripting is done through .NET and the mscorlib is the core of the same (independent if MS .NET or Mono)

The “full DLLs” are there for the editor, as the editor uses .NET as well. So for it to run the regular .NET needs to be present.

As for stripping: it does not change the DLL used. It just does not include those parts that are not used in the application. Stripping is a iPhone Advanced only feature.