Getting Exception while generating ios build when upgraded to El capitan

i am getting this error while trying to generate the build on el capitan.It was running fine when i was on yosemite.
Here is the code i am using.

NSTask *task=[[NSTask alloc]init];

NSArray *arguments1 = @[@-v,@archive,@--configuration:AppStore|iPhone,@/XXX/SimpleTableView.sln];

[task setArguments:arguments1];

[task setLaunchPath: @/Applications/Xamarin Studio.app/Contents/MacOS/mdtool];
NSPipe *pipe=[[NSPipe alloc]init];
[task setStandardOutput:pipe];
[task setStandardInput:[NSPipe pipe]];

[task launch];
[task waitUntilExit];

Exception:
Unhandled Exception:
Nested exception detected.
Original Exception: at (wrapper managed-to-native) System.RuntimeType.getFullName (System.RuntimeType,bool,bool)
at System.RuntimeType.ToString () [0x00000] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/corlib/ReferenceSources/RuntimeType.cs:533

And one more thing in this exception mono-4.2.0 is showing but i do not have mono-4.2.0 .I have mono 4.2.1 and mono 3.10.0.so where it is picking from.
If i generate the build through terminal i works fine.

Sign In or Register to comment.