Client Development Tutorial

Step 1 - Creating a new ClientProject

In this section you will copy an existing project, rename it, add it to the existing solution, and then rename all resources as appropriate.

  1. Open Visual Studio .NET 2013 and then open the Sample Applications Source Code solution. The default installation location will be:
    C:\Program Files\OPC Foundation\Unified Architecture Sample Applications\source\SampleApplications.sln

  2. We will now duplicate the Reference Client project:

    1. Now switch to Windows Explorer.

    2. Locate the "Reference Client" project, which is in the following default location:
      C:\Program Files\OPC Foundation\Unified Architecture Sample Applications\source\workshop\reference

    3. Right-click on the "Client" directory and choose Copy.

    4. In the same "reference" folder you will Paste.

    5. A duplicate folder called "Client- copy" will be created. Rename this folder as appropriate, e.g. MyClient.

    6. Double-click the new folder to open it.

    7. Rename the file "Reference Server.csproj" as appropriate, e.g. "MyClient".
      Note: this will not rename all resources as necessary.

    8. Switch back to Visual Studio .NET 2013.

  3. Within this solution you can Add the project you previously copied:

    1. Right-click on the "ComplianceReference" folder that is visible within the Solution Explorer, choose Add Existing Project.

    2. Using the navigation window locate, highlight, and select the *.csproj that you renamed in step 2.7 above.

    3. The newly added project will be added to the solution and visible in the solution explorer.

  4. Now rename the remaining resources as appropriate:

    1. Assembly name:

      1. Open the properties of the newly added project.

      2. Modify the "Assembly name", e.g. "Quickstarts.MyClient".

      3. Modify the "Default namespace", e.g. "Quickstarts.MyClient".

    2. Product Renaming:

      1. Within the current project, conduct a search and replace "ReferenceClient" with the intended name, e.g. "MyClient".

      2. Again, within the same project conduct a search and replace "Reference Client" with the intended name, e.g. "My Client".

      3. You may also with to rename the "OPC Foundation" branding as your own company, in which case simply search and replace ""OPC Foundation" (note the quote before OPC) with your company name, e.g. "My Company".

      4. Rename the configuration file "Quickstarts.ReferenceClient.Config.Xml", e.g. "Quickstarts.MyClient.Config.Xml".

    3. Compile the application and run it to make sure that it opens and that the application name matches your expectations.

    4. If you are an inquisitive person you might try connecting a UA Server to your newly created UA Client.

At this point you have created a clone of the Reference Client.

Next, Step 2 - Enhance User Interface.