0
votes

I am able to open the storyboard file in Xcode 9.2 but unable to open the file in Visual studio (Version 7.4 (build 1033))

Below is the log

There was a problem parsing the XML in this document

Error Log:

System.NotSupportedException: Could not parse xml ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object at MonoTouch.Design.Parser.ParseElement (MonoTouch.Design.ProxiedViewController model, MonoTouch.Design.ParseContext context) [0x00163] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:767 at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/MonoMethod.cs:305 --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00043] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/MonoMethod.cs:313 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229 at MonoTouch.Design.Parser.ParseElements (MonoTouch.Design.ParseContext context, System.Object result) [0x000e3] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:324 at MonoTouch.Design.Parser.ParseElementsAndAttributes (MonoTouch.Design.ParseContext context, System.Object result) [0x00035] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:274 at MonoTouch.Design.Parser.ParseCore (MonoTouch.Design.ParseContext context, System.Object result, Xamarin.Designer.ProxiedException error) [0x0012f] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:382 at MonoTouch.Design.Parser.ParseCore (MonoTouch.Design.ParseContext context) [0x00050] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:245 at MonoTouch.Design.Parser.ParseElement (MonoTouch.Design.Scene scene, MonoTouch.Design.ParseContext context) [0x0009d] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:701 at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/MonoMethod.cs:305 --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00043] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/MonoMethod.cs:313 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229 at MonoTouch.Design.Parser.ParseElements (MonoTouch.Design.ParseContext context, System.Object result) [0x000e3] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:324 at MonoTouch.Design.Parser.ParseElementsAndAttributes (MonoTouch.Design.ParseContext context, System.Object result) [0x00035] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:274 at MonoTouch.Design.Parser.ParseCore (MonoTouch.Design.ParseContext context, System.Object result, Xamarin.Designer.ProxiedException error) [0x0012f] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:382 at MonoTouch.Design.Parser.ParseCore (MonoTouch.Design.ParseContext context) [0x00050] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:245 at MonoTouch.Design.Parser.ParseElement (MonoTouch.Design.Storyboard sb, MonoTouch.Design.ParseContext context) [0x00046] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:906 at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/MonoMethod.cs:305 --- End of inner exception stack trace --- at MonoTouch.Design.Parser.Parse (MonoTouch.Design.ParseContext context, System.Boolean skipImageGeneration) [0x0002a] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:225 at MonoTouch.Design.Parser.Parse (MonoTouch.Design.ParseContext context) [0x00001] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:214 at MonoTouch.Design.Parser.Parse (System.Xml.Linq.XElement xml, MonoTouch.Design.DeviceFamily targetRuntime, MonoTouch.Design.IModelObjectContext modelObjectContext) [0x00016] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:203 at MonoTouch.Design.Client.IPhoneDesignerSession+d__164.MoveNext () [0x001c0] in /Users/vsts/agent/2.129.1/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:414 Contents of /Users/prashanttelangi/Library/Logs/VisualStudio/7.0/iOSDesigner.2018-03-15__12-59-58.log: Commit: ce1c2b463f394d025915bbd9e92ec2f1d4ed4b9e [2018-03-15 13:00:12.6] INFO: IPhoneDesignerSdkManager: Initializing the designer service [2018-03-15 13:00:12.7] INFO: ENTERING sandbox: AndroidDesignerMac [2018-03-15 13:00:12.7] INFO: LEAVING sandbox: AndroidDesignerMac

Any help is appreciated! Thanks in advance!

1
does that happen for every .storyboard or a specific one?Scarnet
Nope, only for a specific storyboard.Prashant
Okay, did you create this file using VS and added view controllers using XCode? or is it just an empty storyboard?Scarnet
I usually add and design any views in XCode and just assign id(outlet) in VS as it is much easier to design views in XCode. The storyboard was working file earlier, i have few VC's in it, but yesterday i added a new VC in Xcode and from then its giving me this error. I tried to revert back my storyboard but still the issue persists.Prashant
it seams like a bug in VS, but generally both VS and XCode use slightly different xml elements format (for instance where do they declare outlets) that might sometimes lead to VS not being able to open it in VS or sometimes the app would crash with no exceptions presentedScarnet

1 Answers

0
votes

I updated my Visual Studio version to 7.4.1 (build 48) and voila this issues seems to be vanished.