creation of classlib of Information Models | OPC UA Companion Standards | Forum

Forum Scope


Forum Options

Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
creation of classlib of Information Models
Stéphane Le liegard
New Member
Forum Posts: 1
Member Since:
sp_UserOfflineSmall Offline
09/16/2019 - 02:58
sp_Permalink sp_Print sp_EditHistory


I am currently trying to create a class lib of the Information Model present on
But i can't figure out if this is possible from the .cs files provided.

Here is the process with DI:

- dotnet new classlib && cp DI/*.cs LibDI/

- dotnet add reference <path/to/Opc.Ua.Core.csproj>

- dotnet build -> missing definitions of different class that are located in OPCFoundation/UA-Nodeset/Schema

- So i repeat the same process to create the LibSchema.

- dotnet build -> loooots of warning like (redirected all output to a log, got about 32000 lines), but still compile:

Le type 'BaseConditionClassState' dans 'C:\Users\Hsioud\Documents\OPCUA\GSM-project\GSM\UA-InformationModels\SchemaLib\Opc.Ua.Classes.cs' est en conflit avec le type import� 'BaseConditionClassState' dans 'Opc.Ua.Core, Version=, Culture=neutral, PublicKeyToken=null'. Utilisation du type d�fini dans 'C:\Users\Hsioud\Documents\OPCUA\GSM-project\GSM\UA-InformationModels\SchemaLib\Opc.Ua.Classes.cs'. [C:\Users\Hsioud\Documents\OPCUA\GSM-project\GSM\UA-InformationModels\SchemaLib\SchemaLib.csproj]

- then back to LibDI, dotnet add reference ../SchemaLib/

- dotnet build -> error:

error CS0433: Le type 'InstrumentDiagnosticAlarmState' existe dans 'Opc.Ua.Core, Version=, Culture=neutral, PublicKeyToken=null' et 'SchemaLib, Version=, Culture=neutral, PublicKeyToken=null' [C:\Users\Hsioud\Documents\OPCUA\GSM-project\GSM\UA-InformationModels\LibDI\LibDI.csproj]

 Do you know how i could solve that ? Is there an easy way to create classlib of the *.cs files you provide in the NodeSet repo ?

I have to use only .NetCore

$ dotnet --version
 Version:   2.2.401

Randy Armstrong
Forum Posts: 532
Member Since:
sp_UserOfflineSmall Offline
09/16/2019 - 03:10
sp_Permalink sp_Print

I am not sure what you are trying to do and why you would want to. The files are already embedded resources in Opc.Ua.Core and can't be added to a second project.

Forum Timezone: America/Phoenix
Most Users Ever Online: 202
Currently Online: Kresimir Maric
Guest(s) 22
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 9
Topics: 796
Posts: 2359