GHIElectronics.OSH.NETMF.Hardware - Using in code

Another noob question: I am still trying to learn how to navigate and use classes in libraries that already exist. I find an example but then it takes a long time before I find the correct libraries (references) to add to the code.


This reference is added in my current project in Visual C#: GHIElectronics.OSH.NETMF.Hardware

And I am referring to the documentation here:
Which is the documentation for library: GHI.OSHW.Hardware

I start getting confused here: the reference is OSH and the documentation is OSHW.

And in my code I am trying to use:
GHIElectronics.OSH.NETMF.Hardware.“etc.” but none of the classes listed in the documentation show up here.

Any guidance would be greatly appreciated.

Thanks again, Keith

Where OSH came from? This was changed long time ago. Are you using a very old SDK?

Everything should be OSHW

This is what shows in my add or remove programs list:

GHI .NET Gadgeteer SDK
GHI Premium NETMF v4.2 SDK

and I am using Visual C# 2010 express

Should I uninstall GHI OSH NETMF v4.1 SDK ?


Ahhh, that was a HUGE clue for me.

In Visual C# Express, Under Project properties, Application, the value of Target framework was set to ‘.NET Micro Framework 4.1’ because I am still working with a FEZ Panda I.

Changing the Target framework from 4.1 to 4.2 .NET Micro Framework changes the list of references that are available in code.

And the light gets a little brighter :slight_smile:

Thanks, Keith

If I may I have a related follow up question:

System.Net.HttpWebRequest exists in System[]

I am using System and System.Net in code.

System is also referenced in the project.

The target framework is set to .NET Micro Framework 4.2. (this may not relate to this issue?)

However, I get the error message the the type or namespace name HttpWebRequest could not be found.

I have also tried System.Net.HttpWebRequest and this does not resolve issue either.

How do I resolve this?

Thanks again.

Yes, the object browser is where I found the information I posted.

HttpWebRequest shows in: System[] and System[]

but not in System[]

So I am still confused.

Ok, that worked.

But why? How did you know to do that?

I really need to connect the dots here and really appreciate the help.

Thanks, Keith

Member of

OK, so let me get this straight, you’re using a Fez Panda? If so, then you do NOT need (and in fact, cannot use) the Open Source Hardware components. The Panda is a PREMIUM 4.1 device, so you only need the PREMIUM libraries. If you try to use the 4.1 OSHW libraries, you’ll get into trouble.

The 4.1 library documentation is and you will find that everything in the OSHW, and more, is available there.

Okay, so now I understand better how the versions and libraries relate.

I uninstalled .netmf tools, OSH, and Gadgiteer SDK’s and some SEED stuff which removed a lot of clutter from the add libraries view.

All I have now listed are Microsoft .NET Micro Framework and GHIElectronics assemblies.

All the comments have helped clarify the matter.

Thanks for the help.