Search
Thursday, December 13, 2018 ..:: Home ::.. Register  Login
   Calendar  
     
  
   Search  
     
  
   Blogroll  
     
  
   Disclosure  
All blog entries are the opinions of the author and do not necessarily reflect the opinions of their employer. All the code presented is for explanation and demonstration purposes only. Any damages incurred to your site and/or data are not the responsibility of the author. Every effort is taken to ensure the code properly compiles, however sometimes there are some hiccups and you might be required to do your own debugging.
     
  
   TechTidBits (Blog)  

Are you getting a useless compile error while compiling your WP7 app with Bing Maps SL user control?

Apr 19

Written by:
Monday, April 19, 2010 9:20 PM  RssIcon

BingPlaying with the Bing Maps Silverlight User Control in WP7 and can't get your solution to compile?  I think I can help you out!

Bing

This week, Colin Melia, Louis-Philippe Pinsonneault, Sylvain Boucher and I did a day of Silverlight at the Ottawa IT Day at Algonquin college (blog entry) and I got a VERY weird bug the last two days which I was getting an extremely cryptic compile error from Visual Studio.

I was getting a number of "The type or namespace name 'Maps' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)'

Bing maps with compile errors

Uh, hhmm, uh, politely and RESPECTFULLY, Uhhh PFO!!!!!!!  Cause the Microsoft.Maps.Map.Control (and it's partner DLL) are BOTH there.  Why the....uhhhmmmm ok, I'm calm again, why aren't you compiling?  After suffering the indignation of "breaking the build" and two days later, I FINALLY figure out what happend.  Well, I didn't actually figure it out, I did what most devs do, we Googl...uhh......hhmmmmmm we BING it! LOL 

See, all the correct references ARE there

Thankfully, MSDN came to the rescue and pointed me to a missing dependency reference to System.Windows.Browser.dll and BINGO!  No more compile errors anymore!  Beautiful!

Everything compile again, BEAUTIFUL!

So, what's the moral of the story?  For now (until MS can correct this "bug" or at least guide us with better compile error), the Bing map dlls need to paired up with the System.Windows.Browser.dll.

These work in mysterious pars

There, now we can continue using the Silverlight Bing Maps user control.  Now it's time to grab a coffee and get coding!

 

Resources

MSDN: Compile error with Bing Maps control

Earthware: Writing a Bing Maps location aware application for Windows Phone 7 Series

Colin Melia's blog

Louis-Philippe Pinsonneault's blog

Sylvain Boucher's Blog

Tech Tid Bits: My presentation at Ottawa IT Day (OITD) 2010

Tags:
Categories:
Location: Blogs Parent Separator TechTidBits

2 comment(s) so far...


Re: Are you getting a useless compile error while compiling your WP7 app with Bing Maps SL user control?

I am developing a Windows Phone 7 app and I get this when I try to compile. I have added all 3 of the .dll's you mentioned but no luck. I am using VS 2010 but I don't think it should make a difference. This is a very frustrating scenario because I thought I had a perfect fix when I found your post. Do I need to remove and re-add? Any other tips you can give to fix this error?

By Gabe on   Thursday, June 03, 2010 10:22 AM

Re: Are you getting a useless compile error while compiling your WP7 app with Bing Maps SL user control?

Hi Gabe, thanks for leaving a comment, one cause I like reading feedbac, and two, cause I think I can help you, well...at least a little bit.

The trick you said above was you're using VS2010, Bing user controls, and I'm assuming you're using the latest'n'greatest of all the WP7 tools right? Including the April "refresh" right? If that's the case, please check out my other link. There's two details there, you're looking for the info about signed assemblies not loading properly.

WP7 April refresh? Do YOUR WP7 apps work now? Mine don't!
http://www.pchenry.com/Home/tabid/36/EntryID/311/Default.aspx

Short story is, WP7 emulator in the April refresh can't load signed assemblies, which Bing user controls are. DOH! If you have PowerShell, you can get around this, BUT you'll have to undo those changes when MS releases another "refresh" of the toolset.

Thanks again Gabe for your comments, I hope the additional information helps out? Good luck!

By phenry on   Thursday, June 03, 2010 10:29 AM

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment   Cancel 
     
  
Copyright 1999-2012 by PCHenry.com   Terms Of Use  Privacy Statement