![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/userdefault.png)
06/18/2019
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
Hi,
I am currently trying to create a class lib of the Information Model present on https://github.com/OPCFoundati.....UA-Nodeset.
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=1.0.0.0, 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=1.0.0.0, Culture=neutral, PublicKeyToken=null' et 'SchemaLib, Version=1.0.0.0, 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
1 Guest(s)