GetUniqueId() missing from GHIElectronics.TinyCLR.Native.DeviceInformation

The tutorial documentation on the GHI website (Device Information) for the DeviceInformation class demonstrates the use of GetUniqueId() method.
However, when attempting to use the method, visual studio reports the error “Cannot resolve symbol GetUniqueId”. This happens even though the latest release of GHIElectronics.TinyCLR.Native is referenced in the project and the “using GHIElectronics.TinyCLR.Native;” is included in the source code.

it has to work.

seems to me that your project wasn’t clean enough.

You need delete all file in packages, debug or release folder. Rebuild again.

I just removed all GHIElectronics.TinyCLR packages used by my assemblies, then deleted the ‘packages’, ‘obj’, ‘debug’ and ‘release’ folders. I then performed a ‘clean’ operation on the projects, then re-installed the required GHIElectronics.TinyCLR packages (v2.0.0) from NuGet.
The problem is still present.
This is what the Object browser shows in Visual Studio…


You can see that none of the methods that are supposed to be in the DeviceInformation class are present.
[EDIT] I also tried v2.0.0-rc2 of all the required packages, but the methods are still missing.

This feature is not available on v2.0.0.

I see the GHIEle…TinyCLR.Pins you still use mscorlib v2.0.0.0
It also mscorlib 4.0.0.0 which shouldn’t in your project.
Install v2.1.0-rc2, make a new simple project and test it.

You need to install vsix…

Below is mine:

1 Like

I updated everything as you suggested and the problem is resolved.

Thank you for your help.

2 Likes