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

ARC Pro will give you immediate updates and new features needed to unleash your robot's potential!

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?

PRO
Synthiam
#9  

Shoes schmooos

  1. The framework is 4.5. Does the readme say 4? I'll have to change that:)

  2. There is only EZ_B.DLL and you need to add a reference to it

  3. I'm unable to speak on behalf of Microsoft Visual Studio's bugs:(

  4. Some projects will require references, others won't. It depends on what visual studio decides to do when the project is loaded on another computer

  5. Every time ARC is compiled during development, it also compiles every tutorial as well. This ensures all of my tests are working. Every tutorial is a unit test for the EZ_B.dll

What is the exact project name that you are loading?

PRO
Synthiam
#11  

Oops - is that in the sdk? Isn't supposed to be - it isn't even in my project. It's an old folder. Guess I forgot to delete it!

#12  

Even when I go to one of the numbered examples, I still have issues, that I think resolve around the AnyCPU vs x86.

Anyway you can zip one of the projects that will work so I can see what all is being changed/added in the properties?

#13  

Never mind got it figured out under the x86 (build configuration) once I was working on a valid project.

Had to also: --Build Menu---Configuration Manager----Change active solution to x86 and the project platform to x86 and build checked.

#14  

@d.cochran , I had sent you an email from my personal email account about your EZ-AI software, did you get it?

#15  

I'll check. I get many many emails a day and we had a tornado outbreak here today. We are fine but it kind of consume s my day when that happens.