0
votes

I installed Visual Studio for Mac - Community and followed the Xamarin.iOS tutorial from the Xamarin site. When I select Main.storyboard I get an exception - Am I doing something wrong?:

My installation info: === Visual Studio Community 2017 for Mac ===

Version 7.2.2 (build 7) Installation UUID: adfed099-1ec0-45d3-b154-d4ce3ffe4bd3 Runtime: Mono 5.4.1.6 (2017-06/1f4613aa1ac) (64-bit) GTK+ 2.24.23 (Raleigh theme)

Package version: 504010006

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet Runtime Version: 2.0.0 SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks SDK Version: 2.0.0 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.6 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 8.0.2.1 (Visual Studio Community) Android SDK: /Users/daniel/Library/Android/sdk Supported Android versions: 6.0 (API level 23) 7.1 (API level 25)

SDK Tools Version: 25.2.5 SDK Platform Tools Version: 25.0.5 SDK Build Tools Version: 25.0.3

Java SDK: /usr java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Inspector ===

Version: 1.3.2 Hash: 461f09a Branch: 1.3-release Build date: Tue, 03 Oct 2017 18:26:57 GMT Client compatibility: 1

=== Apple Developer Tools ===

Xcode 9.1 (13532) Build 9B55

=== Xamarin.iOS ===

Version: 11.2.1.0 (Visual Studio Community) Hash: 12e80e01 Branch: d15-4-xi Build date: 2017-10-13 12:03:42-0400

=== Xamarin.Mac ===

Version: 3.8.1.0 (Visual Studio Community)

=== Build Information ===

Release ID: 702020007 Git revision: 2236098c68f51eeb447cb947a87371d1e84f6213 Build date: 2017-10-23 11:43:05-04 Xamarin addins: eaa605cf97f25ce184949f32c712b465ca96f665 Build lane: monodevelop-lion-d15-4

=== Operating System ===

Mac OS X 10.12.6 Darwin 16.7.0 Darwin Kernel Version 16.7.0 Thu Jun 15 17:36:27 PDT 2017 root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

The Exception: 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.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.Client.IPhoneDesignerSession.GetCurrentXcodeVersion () [0x00000] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:851 at MonoTouch.Design.Client.IPhoneDesignerSession.get_XcodeVersion () [0x00000] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:160 at MonoTouch.Design.IModelObjectContextExtensions.WithIdProvider (MonoTouch.Design.IModelObjectContext context, MonoTouch.Design.IIdProvider idProvider) [0x0000b] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/IModelObjectContextExtensions.cs:10 at MonoTouch.Design.Parser.ParseElementsAndAttributes (MonoTouch.Design.ParseContext context, System.Object result) [0x0003d] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:278 at MonoTouch.Design.Parser.ParseCore (MonoTouch.Design.ParseContext context, System.Object result, Xamarin.Designer.ProxiedException error) [0x000d0] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:370 at MonoTouch.Design.Parser.ParseCore (MonoTouch.Design.ParseContext context) [0x00041] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:245 at MonoTouch.Design.Parser.ParseElement (MonoTouch.Design.LayoutGuides layoutGuides, MonoTouch.Design.ParseContext context) [0x0000f] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:1019 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/4992/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/4992/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/4992/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) [0x000da] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:324 at MonoTouch.Design.Parser.ParseElementsAndAttributes (MonoTouch.Design.ParseContext context, System.Object result) [0x0002d] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/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) [0x000d0] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:370 at MonoTouch.Design.Parser.ParseCore (MonoTouch.Design.ParseContext context) [0x00041] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:245 at MonoTouch.Design.Parser.ParseElement (MonoTouch.Design.ProxiedViewController model, MonoTouch.Design.ParseContext context) [0x000f3] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:751 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/4992/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/4992/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/4992/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) [0x000da] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:324 at MonoTouch.Design.Parser.ParseElementsAndAttributes (MonoTouch.Design.ParseContext context, System.Object result) [0x0002d] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/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) [0x000d0] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:370 at MonoTouch.Design.Parser.ParseCore (MonoTouch.Design.ParseContext context) [0x00041] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:245 at MonoTouch.Design.Parser.ParseElement (MonoTouch.Design.Scene scene, MonoTouch.Design.ParseContext context) [0x0008b] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:689 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/4992/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/4992/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/4992/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) [0x000da] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:324 at MonoTouch.Design.Parser.ParseElementsAndAttributes (MonoTouch.Design.ParseContext context, System.Object result) [0x0002d] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/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) [0x000d0] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:370 at MonoTouch.Design.Parser.ParseCore (MonoTouch.Design.ParseContext context) [0x00041] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:245 at MonoTouch.Design.Parser.ParseElement (MonoTouch.Design.Storyboard sb, MonoTouch.Design.ParseContext context) [0x00040] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:884 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/4992/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) [0x00021] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:225 at MonoTouch.Design.Parser.Parse (MonoTouch.Design.ParseContext context) [0x00000] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/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) [0x00014] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Parser.cs:203 at MonoTouch.Design.Client.IPhoneDesignerSession+d__163.MoveNext () [0x00130] in /Users/builder/data/lanes/5144/2236098c/source/md-addins/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:412

Contents of /Users/daniel/Library/Logs/VisualStudio/7.0/iOSDesigner.2017-11-03__22-14-31.log: MDAddinsHash: eaa605cf97f25ce184949f32c712b465ca96f665

Any clues?

1
If you right-click on the storyboard and choose Xcode Interface Builder does the storyboard open ok?SushiHangover
Yes, that does open it in XCode.Daniel

1 Answers

-1
votes

What is your version of XCode? Xibs that are saved using XCode 9.1 can not be opened from Visual studio.

  • Download an older version of XCode
  • Open your file with it
  • Save it
  • Then open it from visual studio.

Updated:

Some more steps

  • Switch to beta channel (in more detail):
  • Click on visual studio menu (upper left corner)
  • Click on check for updates
  • Swicht to beta channel
  • Update