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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

.NET SDK first steps to get examples going

trauhut
1-Visitor

.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!!!

ACCEPTED SOLUTION

Accepted Solutions
riaanl
7-Bedrock
(To:trauhut)

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
trauhut
1-Visitor
(To:trauhut)

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

riaanl
7-Bedrock
(To:trauhut)

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.

jdaniel
1-Visitor
(To:riaanl)

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).

ibanham
12-Amethyst
(To:jdaniel)

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.

jdaniel
1-Visitor
(To:ibanham)

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?

riaanl
7-Bedrock
(To:jdaniel)

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

trauhut
1-Visitor
(To:riaanl)

Thank you very much this works fine.

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

Announcements


Top Tags