locked
How add Windows.Devices.Usb namespace to Windows Store project? RRS feed

  • Question

  • So as I understand it, to read the weight off a scale attached to my COM3 via USB port, I MUST have Windows 8.1 (not possible or at least easy-to-do under Windows 8.0).. and that means using the new namespace Windows.Devices.Usb.

    So I see the Winusb.sys file under

    C:\Windows\System32\DriverStore\FileRepository\winusb.inf_amd64_ed914f5101cd8e33

    but I need, but I need a DLL, right?

    Thanks for any help.

    Sunday, September 22, 2013 4:54 PM

Answers

All replies

  • Hi coojbs,

    I don't know if I understood your question the right way. For using the classes from Windows.Devices.Usb you don't need to use a DLL. The classes are part of the Windows Runtime and available in your Windows Store App-Project in Windows 8.1.


    Thomas Claudius Huber

    "If you can´t make your app run faster, make it at least look & feel extremly fast"

    twitter: @thomasclaudiush
    homepage: www.thomasclaudiushuber.com
    author of: ultimate Windows Store Apps handbook | ultimate WPF handbook | ultimate Silverlight handbook

    Sunday, September 22, 2013 5:34 PM
  • But when I try to add:

    using Windows.Devices.Usb

    at the top of the page, it isn't listed as an option.

    thanks

    Sunday, September 22, 2013 7:48 PM
  • Then you're not running Windows 8.1. You need to target Windows 8.1 to have this Namespace available, as it's part of the Windows Runtime (WinRT) that itself is part of Windows. And only in Windows 8.1 it contains the Windows.Devices.Usb-Namespace.

    Thomas Claudius Huber

    "If you can´t make your app run faster, make it at least look & feel extremly fast"

    twitter: @thomasclaudiush
    homepage: www.thomasclaudiushuber.com
    author of: ultimate Windows Store Apps handbook | ultimate WPF handbook | ultimate Silverlight handbook

    • Marked as answer by fiverc Monday, September 23, 2013 12:39 PM
    Sunday, September 22, 2013 10:46 PM
  • I am on Windows 8.1.  Can you tell me where to change the target, please?  Under "Project Settings > Application" my Target framework dropdownlist box is disabled and empty.

    I can still do this from Visual Studio 2012 right?  We have a policy of not using release candidates so I don't have Visual Studio 2013.  thanks.

    • Edited by fiverc Monday, September 23, 2013 12:39 PM
    Monday, September 23, 2013 12:37 PM
  • Visual Studio 2013 is required to write apps for Windows 8.1.

    VS2012 can only do Windows 8 apps (which run on Windows 8.1, but which cannot use the new functionality).

    --Rob

    Monday, September 23, 2013 1:54 PM
    Moderator