I am writting a PC SDK application in VS2005 for Robotware 5.07. I am able to successfully scan the network for available controllers. However I get a license error when attempting to get a reference to a controller using ControllerFactory.
The manual gives a very brief explanation of how to handle licensing, but not enough for me to figure it out. Can someone fill in the gaps in this document? What should the text in the license.licx file look like?
Overview
Deployed applications do a licensing check during startup. The license manager checks that the PC SDK license key is part of the deployed assembly. If the key is missing you will not be able to use the PC SDK functionality.
| |
| |
Adding a license key
The license key should be placed in a “Licenses.licx” file and this file should be added to the application project as an embedded resource. The key for the RAB-PC SDK in VS 2003 is:
I tried to compile the licenses manually using lc.exe at the command line. I’m not an expert in this area, but it looks like the licensing mechanism can’t find the assembly information for the ABB stuff. Here is copy of what dumps out on the command line…
C:VisualStudioC#RABTestsNetworkScanAppNetworkScanApp&g t;lc.exe /target:Networ
kScanApp.exe /complist:licenses.licx /i:ABB.Robotics.Controllers
Microsoft (R) .NET License Compiler
[Microsoft .Net Framework, Version 2.0.50727.42]
Copyright (c) Microsoft Corporation. All rights reserved.
Processing complist ‘licenses.licx’…
licenses.licx (1) : error LC0003 : Unable to resolve type ‘ABB.Robotics.Controllers.Licenses.PCSdk’
licenses.licx (2) : error LC0003 : Unable to resolve type 'ABB.Robotics.Controllers ’
The problem is solved now. For some reason when I added the license file to my project using “add existing item” visual studio failed to “include” the file in the build. I had to right-click on the file in the solutions brower and select the “Include in Project” setting. I guess vs2005 does not do that automatically when the file is added to the project.