cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

.NET SDK first steps to get examples going

SOLVED
Highlighted
Newbie

.NET SDK first steps to get examples going

Hello community,

i already worked with your C SDK and everything was fine.

Right now i tried to get this .NET SDK working to combine it with some c# programms.

I tried the examples with Visual Studio 15 and 10 but couldn't fix ist as i followed the instructions on http://support.ptc.com/cs/help/thingworx_hc/thingworx_edge/index.jspx?id=thingworx15&action=show -> SDK Steam Sensor Example.


But when it comes to:

5. Add the core SDK (twApi.dll) to the project. Reference the version of this file that is appropriate to the processor of your device from the SDK\tw\x86 or SDK\tw\64 folder of the SDK installation.

I am not able to do so:  References -> Add Reference -> Browse twApi.ddl (x64 for my 64Bit System) -->> "A reference ... could not be added"

I also could not find the property "copy to output directory" yet.

So when i try to run the example it just starts and stops again, because if(args.Length < 3) fails.

I think it does not get the configuration because of the missing core SDK.

Do you have any solutions or idea and could please help me?

Thanks a lot!!!

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: .NET SDK first steps to get examples going

Try this:

  • Right click on your VS project within your solution
  • Navigate to "Add" in the context menu, and click "Add Existing Item".  Browse to the appropriate version of the TWApi.dll and select it.  This will add the file to the project but not as a reference.
  • Click on the TWApi.dll file within the project.  Once clicked, go to properties of that file (same property pane that you is universally used within Visual Studio).  Change the property called 'Copy to Output Directory' to: Copy if newer.

View solution in original post

7 REPLIES 7

Re: .NET SDK first steps to get examples going

As we figured out your twApi.ddl seams to be corrupt...?

Re: .NET SDK first steps to get examples going

Try this:

  • Right click on your VS project within your solution
  • Navigate to "Add" in the context menu, and click "Add Existing Item".  Browse to the appropriate version of the TWApi.dll and select it.  This will add the file to the project but not as a reference.
  • Click on the TWApi.dll file within the project.  Once clicked, go to properties of that file (same property pane that you is universally used within Visual Studio).  Change the property called 'Copy to Output Directory' to: Copy if newer.

View solution in original post

Re: .NET SDK first steps to get examples going

Where can you find the TWApi.dll?  It's not included in the .NET SDK zip file package (MED-61061-CD-055_F000_ThingWorx-DotNet-SDK-5-0-1-103.zip).

Re: .NET SDK first steps to get examples going

I agree, it's not in that download... Is there a specific reason you're using that version? If not try one of the newer versions.

Re: .NET SDK first steps to get examples going

That is a really old version of the SDK.  The latest listed today is: DotNet-SDK-5-6-1-1100-win

Re: .NET SDK first steps to get examples going

Thanks for the quick reply.  The download package I mentioned is the only download package available within my download section.  Where can I find the newer download packages?

Re: .NET SDK first steps to get examples going

Thank you very much this works fine.

I added this dll and changed property. Right now i can run this project.