You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to compile the ModelDesign of an empty namespace but it fails with
PS C:\UA-ModelCompiler\Bin\Release> .\Opc.Ua.ModelCompiler.exe -d2 C:\opcua-modeling-tutorial\FooFltModel.xml -cg C:\opcua-modeling-tutorial\FooFltModel.csv -o C:\opcua-modeling-tutorial\FooFltModel -console
Object reference not set to an instance of an object.
at Opc.Ua.ModelCompiler.ModelCompilerValidator.Validate2(IList`1 designFilePaths, String identifierFilePath, Boolean generateIds) in C:\UA-ModelCompiler\ModelCompiler\ModelDesignerValidator.cs:line 1099
at Opc.Ua.ModelCompiler.ModelGenerator2.ValidateAndUpdateIds(IList`1 designFilePaths, String identifierFilePath, UInt32 startId, String specificationVersion) in C:\UA-ModelCompiler\ModelCompiler\ModelGenerator2.cs:line 95
at Opc.Ua.ModelCompiler.Program.ProcessCommandLine2(List`1 tokens) in C:\UA-ModelCompiler\ModelCompiler\Program.cs:line 422
Here is the ModelDesign file I am trying to compile.
<?xml version="1.0" encoding="utf-8"?>
<ModelDesign
xmlns:uax="http://opcfoundation.org/UA/2008/02/Types.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ua="http://opcfoundation.org/UA/"
xmlns:FooZbrFlt="https://new.foo.com/zebra-compression/flattening-and-subspacefolding/UA/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
TargetNamespace="https://new.foo.com/zebra-compression/flattening-and-subspacefolding/UA/"
TargetVersion="0.9.0"
TargetPublicationDate="2020-05-01T00:00:00Z"
xmlns="http://opcfoundation.org/UA/ModelDesign.xsd">
<Namespaces>
<!--No space allowed at the beginning of the namespace URL!
Prefix sets the filenames of the generated files. -->
<Namespace Name="FooZbrFlt" Prefix="FooFlt">https://new.foo.com/zebra-compression/flattening-and-subspacefolding/UA/</Namespace>
<Namespace Name="OpcUa" Version="1.03" PublicationDate="2013-12-02T00:00:00Z">http://opcfoundation.org/UA/</Namespace>
</Namespaces>
<!-- Instantiate at least one variable (or object, or view, or ...) in namespace.
Compiling an empty namespace will fail with error message:
Object reference not set to an instance of an object.
Uncomment to following view and the ModelDesign will compile successfully. -->
<!--
<View SymbolicName="FooZbrFlt:MyView">
<Description>Dummy view.</Description>
<References>
<Reference IsInverse="true">
<ReferenceType>ua:Organizes</ReferenceType>
<TargetId>ua:ObjectsFolder</TargetId>
</Reference>
</References>
</View>
-->
</ModelDesign>
The model design file will compile successfully, if the view is uncommented and the namespace therefore is not empty.
Is this a bug of UA-ModelCompiler?
The text was updated successfully, but these errors were encountered:
It allows you to test your server and toolchain without any knowledge about Nodesets and models. It's an edge case, but a rather helpful one. It helps you to start from scratch with your model/nodeset, which is a reasonable first step when starting with OPC UA modelling and getting to know variables, types, etc.
It has a workaround (adding e.g. a view as shown above) too, lowering the priority even further. But it is a confusing bug that will mainly be hit by newcomers.
Hi,
I want to compile the ModelDesign of an empty namespace but it fails with
Here is the ModelDesign file I am trying to compile.
The model design file will compile successfully, if the view is uncommented and the namespace therefore is not empty.
Is this a bug of UA-ModelCompiler?
The text was updated successfully, but these errors were encountered: