Splat [0.3.4] on Xamarin.iOS: issues with RectangleF and PointF
Asked Answered
M

2

3

I'm trying to embrace the new PCL fun on a Xamarin.iOS project in Xamarin Studio. I created a PCL "Core" library for my project and added Splat (v0.3.4) via NuGet. Then, in a consuming iOS project, I reference my core library. Once I do that, a couple compile errors show up.

One of these:

Error CS0012: The type `System.Drawing.PointF' is defined in an assembly that is not referenced. Consider adding a reference to assembly `Splat.Portable, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' (CS0012)

Multiple of these:

Error CS0029: Cannot implicitly convert type `System.Drawing.PointF [monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065]' to `System.Drawing.PointF [Splat.Portable, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]' (CS0029)

It looks like this was addressed in an pull request to Splat that landed since v0.3.4 hit NuGet. Following along with the notes there, I added a reference to Splat.Portable.dll to the iOS project. When I do, the compile errors change up to complain about too many type definitions.

Error CS0433: The imported type `System.Drawing.RectangleF' is defined multiple times (CS0433)
Error CS0433: The imported type `System.Drawing.PointF' is defined multiple times (CS0433)

Is it possible to work around these errors using Xamarin Studio 4.2.1 (Xamarin.iOS 7.0.4.209), and Splat 0.3.4 or do I need to build the latest code with its type-forwarding awesomeness?

Marney answered 4/12, 2013 at 20:23 Comment(0)
P
5

Yep, I'll build a new release of Splat tomorrow'ish, but building from source will also solve this.

Edit: Splat 1.0 is live and contains the fix for this bug

Pulmonic answered 5/12, 2013 at 0:16 Comment(1)
Hi Paul, I just installed Splat today (actually it got installed with Akavache) and I'm having this error. Splat version is 1.3.3 on iOS. Do you know of any solution? thank youAmericanist
J
0

Update Splat to the last version (1.6.2) - Splat 1.3.3 still have this issue.

Jaehne answered 5/7, 2016 at 10:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.