.NET Based OPC UA Client/Server SDK
3.0.1.448
|
Select “File → New → Project” from the menu. Select “Visual C#” from the tree and pick the template “Windows Forms Application”.
Application"
Change project name and location to your liking.
Delete the following line from the file Program.cs
Right click on “References” in the Solution Explorer and choose “Add Reference...” from the context menu.
In the tab “.NET” of the newly opened window select UnifiedAutomation.UaBase and UnifiedAutomation.UaClient and confirm with “OK”
Add the following line to the file Program.cs:
Right click on your project in the Solution Explorer and choose “Add → New Folder” from the context menu.
Name the newly created folder License.
Right click on the License Folder and select “Add → Existing Item...”
Set the file filter to “All Files (*.*)”, navigate to a folder containing a license file (e.g. [Installation Directory]/UnifiedAutomation/UaSdkNetBundleBinary/examples/BasicClient/License), select the file License.lic and confirm with “Add”.
Right click on License.lic and select “Properties”. Set the build action to “Embedded Resource”.
Add the following code to the file Program.cs to embed the license:
Add an App.config file via context menu “Add → Existing Item” to your project (e.g. from [Installation Directory]/UnifiedAutomation/UaSdkNetBundleBinary/examples/BasicClient). More information on configuration settings can be found in the documentation for the Base Library under Configuration Schema.
Right click on App.config and select “Properties”. Set the build action to “None”.
Add the following method to Program.cs, where “Form1” is the automatically created form when creating the new project:
Add the following code to Program.cs to start ApplicationInstance: