Hi. I have the EMX Development Board. It was 4.1 based and I used it about a year ago. I pulled it out and upgraded the firmward to 4.2. Now, I feel totally and completely lost. The tutorials and examples don’t work as I seem to be having library issues.
For example, what was installed on my PC (fresh install – new PC since last year) is
GHI.Premium.*
All the manuals call for
GHIElectronics.NETMF.*
Consequently, there’s very little example/tutorial code I’ve found that runs as is.
It seems the documentation provided with the new libraries has not been updated. I’m really interested in the webserver, email, and other TCPIP examples. I can’t seem to find all the libraries and changes needed to get these up and running.
Architect - thank you as well. I’ve been going through those tutorials… that’s where I ran into a lot of issues. After you sent your message, I found one that refered to GHI.Premium. However, even it doesn’t seem to be completely updated.
For example:
PWM MyServo = new PWM(Cpu.PWMChannel.PWM_3,20 * 1000 * 1000, 1250 * 1000, PWM.ScaleFactor.Nanoseconds, false);
Visual Studio reports that ‘PWM’ is not found. However, I have all the using statements listed in the examples, and I added refferences for each of the using statments.
Thank you. Something hasn’t clicked yet on how to discover these libraries, because I’m getting really frustrated. For example, IPHostEntry. Doing a google, MSDN, and TinyCLR search, I come to:
Which seems to imply that it is part of the System.Net namespace. System.Net does not show up in the .NET tab when I try to add a reference. System does, and I found System.Net to be a part of that. Why then, is System.Net.Security not a part of System.Net (ie. and therefore a part of System)?
Sorry. I don’t mean to ask novice questions. I’ve coded for a long time, but library locations has always be a stumbling block.
@ Rick7 - you have understand the difference between an assembly and a namespace.
An assembly is a file that has you code and resources or system code and resources.
Your code or system code is organized into namespaces.
One assembly can have multiple different namespaces.
Same namespace can be used across multiple assemblies.
So System.dll is an assembly System.Net and System.Net.Security are two namespaces inside System.dll
Thank you. That makes sense. I found an example of where I get totally lost. In my code is a reference to HttpListenerResponse. It gives an error indicating the type or namespace could not be found.
In researching this, I come up with:
The version information indicates “Available in the .NET Micro Framework versions 4.0, 4.1, and 4.2.”
Namespace: System.Net
Assembly: System (in system.dll)
I have “System” in my References and System.Net in my “using” since it’s the namespace.
However, in looking at System and System.Net in the Object Browser, there is no HttpListenerResponse anywhere that I can find.
@ Architect - what is one to do when there are NO references for something that appears in some sample code? I’m trying to find USBC_MassStorage and it doesn’t show up, even though I’m searching through all components. This is the sort of thing that can drive us newbies crazy…
How do I load/Reference that assembly? There is no GHI.Premium.USBClient if I do a using statement. Is there some magic to reference the .dll that I am missing?
I usually right mouse button click the reference group in the Solution Explorer of The Visual Studio and then choose “Add Reference”. Then select the required assembly/dll
Thank you. I do that as well. Interestingly, the reason I missed the System.Http is because it was listed under the .NET tab when I clicked Add Reference. I did find it by browsing to the .NET Micro Framework 4.2 folder. I’m not sure why — it and several others are showing up today just fine.
I have another one that is stumping me. Ethernet, Ethernet.IsCableConnected, NetworkAvailabilityBlocking, ethernet_last_status, network_is_read, and some others are not found. Here’s what I’m trying to do to find them:
Going to the object browser. Under the dropdown, “My Solution” is listed. I can explore the objects in my solution just fine.
I click the dropdown next to “Browse:” and select .NET Micro Framework 4.2.0.0. – thing ever shows up. The three white panels below all stay completely clear of any info, text, etc.
I click the dropdown next to “Browse” and select All Components. I click the search box and enter NetworkAvailabilityBlocking (I also tried the others), and click the green search button and it doesn’t find these in any of the listed libraries. So I check one of the listed libraries for something that is in there that I can search for to make sure the search is working. Searching for SMTP it found several entries right away.