David Hazel
David Hazel

Reputation: 41

Namespace or type specified in the Imports 'Windows.Devices.PointOfService' doesn't contain any public member or cannot be found

I have searched on this site, and elsewhere, for help with this problem, but have been unable to find anything that helps me to resolve it, hence asking this question here. I found a few questions on this site which refer to the namespace in my title, but none of them shed any light on my particular problem.

I have taken over maintenance of an application which was written by a third party, targeted at a Windows device with a camera and barcode scanner (a Panasonic FZ-E1 Toughpad). This software is already in live use, meaning that it has been built and distributed to phones which are being used within the company. It is a custom-written business application, not a commercial application and not intended for public use. The software is distributed to the scanners via the Microsoft App Store.

The software is written in VB.NET, and all of the projects in the solution say they are targeted at Windows Phone Silverlight 8.1. I am using Visual Studio 2015 to work on this software, on a system which is running Windows 10 Home (64-bit).

My issue is that I am unable to build the software, as one of the classes within one project imports the namespace Windows.Devices.PointOfService, from which it uses the classes BarcodeScanner, ClaimedBarcodeScanner, BarcodeScannerDataReceivedEventArgs and BarcodeSymbologies. However, Visual Studio is showing the following warning:

Namespace or type specified in the imports ‘Windows.Devices.PointOfService’ doesn’t contain any public member or cannot be found.

As a consequence of this warning, there are also errors, to do with the fact that none of the classes from that namespace can be found. I cannot see the namespace Windows.Devices.PointOfService among those visible in the Object Browser. There are a number of other Windows.Devices namespaces, but not that one.

The following references are defined for the offending project:

I have SDKs installed for Windows 8.1, Windows Phone 8.1 and Windows Phone Silerlight 8.1. I have identified a file called Windows.winmd, which is present within each of these SDKs. In the Windows 8.1 case, this file includes the missing namespace, but the ones for Windows Phone 8.1 and Windows Phone Silverlight 8.1 do not include it. I have tried explicitly referencing the Windows 8.1 version of this file, but Visual Studio seems to ignore this and continues to show the namespace as being missing. Yet the fact that the software is live implies that it was able to be built, presumably from this same solution that I have inherited.

So my questions are:

  1. Is Visual Studio inferring which SDK references to include based on the Windows Phone Silverlight 8.1 target for each project?
  2. Is there any way of overriding its choice of SDK?
  3. Is there another DLL or library that I should be referencing, to get the namespace I need in the case of a Windows Phone Silverlight 8.1 project?
  4. Should I be using a different/earlier version of Visual Studio to work on this? I have 2017 and 2015 installed, but of those only 2015 seems to like this solution.

Upvotes: 1

Views: 668

Answers (1)

David Hazel
David Hazel

Reputation: 41

I found an answer to my own question. After a further search online, I discovered that I was missing the Windows Embedded 8.1 Handheld SDK. Once I installed that, it solved the problem.

Upvotes: 2

Related Questions