Asked — Edited
Resolved Resolved by DJ Sures!

Sdk: C# Cant Get Example To Work, Vb Works

I have been reading and playing around with the SDK, was able to get the servo example to run in VB.net but can not in C#.

EZB_Connect does not exist in the namespace 'EZ_B'.

I double checked to make sure the reference was there.

Also, in the readme documentation, it says .Net Framework v4, I had to set it at 4.5 in order to get the VB sample to run.


ARC Pro

Upgrade to ARC Pro

Don't limit your robot's potential – subscribe to ARC Pro and transform it into a dynamic, intelligent machine.

PRO
Synthiam
#1  

Please read the readme.txt file in the archive and follow the instructions.

#2  

So are you saying go by that file and use V4 of the framework?

I have the reference and also copied all the files to the Output folder.

Don't know which part I did wrong? The VB version runs no problems, once I changed the framework from 4 to 4.5.

So I re-read the file and still cant get the C# version to work.

#3  

It sounds like your reference is not set correctly. Under References, is it listed? Does it show a yellow !

#4  

I think the name of the connect command has changed from when the demo was put out. Check the intelesence in dev studio for the new name.

#6  

d.Cochran, I believe your on to something, once I get back to the computer that has this all setup on, I will see what Intelesence lists.

@justinRatliff, does the C# servo example work for you ok?

PRO
Synthiam
#7  

Ah - the one step is most important. Adding the EZ-B DLL as a reference to the project that you're testing. It's a little silly the way Visual Studio doesn't "remember" project references correctly. It makes downloading examples challenging.

  1. Expand the REFERENCES tree on the project that you wish to compile

  2. Remove (Delete) the EZ-B reference with a ! (exclamation) beside it

  3. Right click and select ADD REFERENCE

  4. Browse to the EZB.DLL and select it

  5. Also, it's a good idea to select all of the files in the EZ-B .Net Folder and add them to your project. Select that they are a "content" type and to be copied when building.

#8  

FIRST: DJ put some shoes on! :D:D

I took a quick look again, and it didn't work.

Quesitons:

  1. Is it Framework V4 per the readme documentation or is it V4.5?

  2. What is the difference between EZ-B and EZ_B ?

  3. Any idea why the VB servo version works fine and the C# one dosnt?

  4. I have added many, many references in the past and never ran into this exact problem, so it has me confused?

  5. So if you followed the exact steps in the readme documentation, the C# servo example worked for you?