none
Can't add a reference to Windows7.SensorAndLocation.dll from Silverlight project RRS feed

  • Question

  • In Visual Studio 2008 when I attempt to add a reference to Windows7.SensorAndLocation.dll from my Silverlight project I get a popup that states:

    "You can't add a reference to Windows7.SensorAndLocation.dll as it was not built against the Silverlight runtime. Silverlight projects will only work with Silverlight assemblies."

    I must be doing something wrong, any ideas?
    Wednesday, May 20, 2009 5:37 PM

Answers

  • Silverlight does not supply the full .NET CLR. I don't know that anyone at MS has tried using the sample interop assembly in Silverlight, but I'm guessing not. I'll look into that.

    In the meantime, you can try migrating the sample interop as a Silverlight project yourself, though I'm sure that this will take some work and you may hit a dead end where the interop requires a .NET feature that simply is not supported.

    If I make any headway from here, I'll post again.
    Jim Travis Windows Sensors and Location Team Windows SideShow Team This posting is provided "AS IS" with no warranties and confers no rights.
    Wednesday, May 20, 2009 5:58 PM

All replies

  • Silverlight does not supply the full .NET CLR. I don't know that anyone at MS has tried using the sample interop assembly in Silverlight, but I'm guessing not. I'll look into that.

    In the meantime, you can try migrating the sample interop as a Silverlight project yourself, though I'm sure that this will take some work and you may hit a dead end where the interop requires a .NET feature that simply is not supported.

    If I make any headway from here, I'll post again.
    Jim Travis Windows Sensors and Location Team Windows SideShow Team This posting is provided "AS IS" with no warranties and confers no rights.
    Wednesday, May 20, 2009 5:58 PM
  • Hi,

    I'm newbie with all this things, but if you're planning to use Location and silverlight, you could try to use Javascript for getting access to Location API. AFAIK Location API has support for scripting (Javascript), and Silverlight also can comunicate easily with Javascript. So, you might try to create an application that use Javscript between SL and Location API ( SL<-->JS<-->Location API ).

    Regard,
    Herberth


    Let us be!
    Wednesday, May 27, 2009 3:16 PM