Coder Social home page Coder Social logo

Comments (23)

pauldendulk avatar pauldendulk commented on May 23, 2024

Searching for 'System.ServiceModel' in all *.csproj files returns no result, so there is no explicit reference to System.ServiceModel in the Mapsui projects. When building Android (did not test iOS) I can see System.ServiceModel dlls generated by the obj folder.

Perhaps it is caused by the PCL profile. I could experiment with this. How could this be tested? Where do you see the System.ServiceModel references?

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

When I start a new Android project and add BruTile, which is just a single PCL with Profile336 I see, System.ServiceModel.dll generated in the \obj\Debug\assemblies folder. I don' see those without BruTile.

So I think this is either a Xamarin bug or they consider PCL Profile336 as not supported by Indy.

Perhaps you could report this to Xamarin.

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

hmm, creating a new empty Profile336 PCL and adding it to a new Android project does not generate the System.ServiceModel assembly. Narrowing it down could take some time.

from mapsui.

bonnojold avatar bonnojold commented on May 23, 2024

Android did not give me any messages concerning the System.ServiceModel assembly, it seems to be iOS only. This is the part that strikes me the most, what's different in iOS that could cause this? Unfortunately I can't get any specific error from Xamarin, the license message shows up when I try to build (using NuGet). I can try to build mapsui from source to find out more tomorrow.

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

Perhaps you can reproduce it with only BruTile. It is simpler
https://github.com/BruTile/BruTile
Or maybe even with a empty PCL with Profile336.

from mapsui.

bonnojold avatar bonnojold commented on May 23, 2024

I'm able to open and run the samples of BruTile. I've opened the full repository of mapsui and I'm able to run the android samples/tests but not the iOS samples due to the same assembly reference.

In the application output window I've found which assemblies are loaded, which results in this list. It looks like the reference is caused by mono or am I mistaken?

Launching application
Application launched. PID = 2398
Press enter to terminate the application
Loaded assembly: /Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.43/lib/mono/2.1/monotouch.dll [External]
Loaded assembly: /Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.43/lib/mono/2.1/System.Core.dll [External]
Loaded assembly: /Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.43/lib/mono/2.1/System.dll [External]
Thread started:  #2
Loaded assembly: /Users/Downloads/Mapsui-master 3/Samples/Mapsui.Samples.iOS/bin/iPhoneSimulator/Debug/MapsuiSamplesiOS.exe
Loaded assembly: /Users/Downloads/Mapsui-master 3/Mapsui.UI.iOS/bin/iPhone/Debug/Mapsui.UI.iOS.dll
Loaded assembly: /Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.43/lib/mono/2.1/OpenTK-1.0.dll [External]
Loaded assembly: /Users/Downloads/Mapsui-master 3/Mapsui.Rendering.OpenTK-iOS/bin/iPhone/Debug/Mapsui.Rendering.OpenTK.dll
Loaded assembly: /Users/Downloads/Mapsui-master 3/Mapsui/bin/Debug/Mapsui.dll
Loaded assembly: /Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.43/lib/mono/2.1/System.Xml.dll [External]
Loaded assembly: /Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.43/lib/mono/2.1/Mono.Dynamic.Interpreter.dll [External]
Loaded assembly: /Users/Downloads/Mapsui-master 3/Samples/Mapsui.Samples.iOS/bin/iPhoneSimulator/Debug/Mapsui.Rendering.iOS.dll
Loaded assembly: /Users/Downloads/Mapsui-master 3/packages/BruTile.0.10.1/lib/portable-net403+sl5+wp8+wpa+win8+MonoAndroid+MonoTouch/BruTile.dll [External]
Loaded assembly: /Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.43/lib/mono/2.1/System.Net.dll [External]
Loaded assembly: /Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.43/lib/mono/2.1/System.Xml.Linq.dll [External]
Loaded assembly: /Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.43/lib/mono/2.1/System.Xml.Serialization.dll [External]
Loaded assembly: /Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.43/lib/mono/2.1/System.ServiceModel.dll [External]
Loaded assembly: /Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.43/lib/mono/2.1/System.Runtime.Serialization.dll [External]
Loaded assembly: /Library/Frameworks/Xamarin.iOS.framework/Versions/8.4.0.43/lib/mono/2.1/System.ServiceModel.Web.dll [External]
Loaded assembly: /Users/Downloads/Mapsui-master 3/Samples/Mapsui.Samples.iOS/bin/iPhoneSimulator/Debug/Newtonsoft.Json.dll [External]

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

So you can run the iOS BruTile samples but can't run the iOS Mapsui Samples?

Is the error where running or while building?

I used dotpeek to inspect MapsuiSamplesiOS.exe and I see that Mapsui references System.ServiceModel.Web and I don't see why. It is not Profile336 in itself because BruTile does not have this dependency and has the same profile.

from mapsui.

bonnojold avatar bonnojold commented on May 23, 2024

I've tested with different licenses. The error is shown while building and the build gets cancelled, Xamarin comes with a window to register a business account and no additional information is shown. With the business license I can build normally (as I'm allowed to refer ServiceModel.Web) which gave me above launch output.

There are no samples/tests for iOS on BruTile, I just tried to build it which was succesful. I have also tried a profile336 pcl project which did not seem to give any issues.

Interesting note: I can't build Mapsui.Samples.iOS but I can build the following projects:

Mapsui
Mapsui.Rendering.iOS
Mapsui.Rendering.OpenTK-iOS
Mapsui.UI.iOS
Mapsui.Rendering.OpenTK.iOS.Tests

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

It is hard for me to investigate this. If anyone finds out more please let me know.

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

I am closing this issue. We have since release two Mapsui iOS apps and did not come across this problem. This could easily have been one of the (many) bugs that Xamarin fixes quickly.

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

Reopened because this was reported again https://github.com/pauldendulk/Mapsui/issues/43

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

I just did some further tests. If I remove RequestHelper.cs from BruTile the assemblies folder is not generated (so no assemblies folder at all). Perhaps this solves the issue for Xamarin.Indy developers.

RequestHelper is not used from BruTile itself but it offered as a kind of utilities class. It does add some value but perhaps it could be removed and be presented as a sample.

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

To Xamarin.Indy developers. You could test this:

  • Clone BruTile
  • Add a new Android app
  • Add BruTile core as reference
  • Confirm the reported problem exists
  • Remove RequestHelper.cs from BruTile
  • Confirm the reported problem does not exist

If this solves the problem we will consider removing RequestHelper.cs. If it is removed we will have to release a new BruTile package and Mapsui package.

from mapsui.

kochizufan avatar kochizufan commented on May 23, 2024

Can I get a RequestHelper.cs-removed-BruTile.dll?
I try to make it, but if I remove RequestHelper.cs, HttpTileProvider.cs throws compile error, so I can't remove RequestHelper.cs.
I can't compile RequestHelper.cs-removed-BruTile, without error.

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

Forgot about that one. You can just remove RequestHelper there and only assign the argument.

Your app will probably not run though. It is just to test Indy.

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

It would also be interesting to see what happens if you compile RequestHelper.cs as part of the Android app itself.

from mapsui.

kochizufan avatar kochizufan commented on May 23, 2024

Itried:

  • I made solution named "BruTileErrorTest".
  • I made projects named "BruTileErrorTest.iOS" and "BruTileErrorTest.Droid" under the solution.
  • I add BruTile project to the solution, and refer it from iOS and Android project.
  • I add dummy code
var web = new BruTile.Web.HttpTileSource (new BruTile.TileSchema (), new BruTile.Web.OsmRequest ());

to iOS project's AppDelegate#FinishedLaunching and Android project's MainActivity#OnCreate.

  • Compiled them. iOS project shows "Need Business edition" error, Android not.
  • In BruTile project, I change RequestHelper.cs's compile option to "None", and HttpTileProvider.cs's code to
    _fetchTile = fetchTile;// ?? (RequestHelper.FetchImage);
  • Compiled iOS and Android projects again. Result is same before. iOS project shows same error, Android not.

If I tested bad way or what you don't wanted, please tell me.

Regards,

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

Thanks for your clear report. We should conclude this does not solve the problem. The fact that iOS needs business and Android not is weird, and indicates it is a bug. We could try to randomly cut parts out of BruTile (maybe anything using system.net) and see if it fixes the problem. But maybe we should first try to ask Xamarin.

from mapsui.

kochizufan avatar kochizufan commented on May 23, 2024

Reported.

https://bugzilla.xamarin.com/show_bug.cgi?id=30621

Thank you for helping us!

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

Thanks a lot!

from mapsui.

kochizufan avatar kochizufan commented on May 23, 2024

Xamarin reported it will fix in Xam.iOS 8.10.3
(If I didn't misunderstand written in English...)
https://bugzilla.xamarin.com/show_bug.cgi?id=30621#c9

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

Ah great! Thanks for taking care of this.

from mapsui.

pauldendulk avatar pauldendulk commented on May 23, 2024

Closing. I assume this is fixed although not tested. Reopen when seen again.

from mapsui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.