Gen C# or Java compiler error output shows model short name instead of Namespace
search cancel

Gen C# or Java compiler error output shows model short name instead of Namespace

book

Article ID: 445768

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset

Issue/Introduction

When generating and compiling for C# (.NET) or Java in Gen 8.6,  and the compile results in errors,  the error message displays errors similar to this format: 

'error CS0246: The type or namespace name 'shortname...'

For this Namespace Name or Java Package Name, it is displaying the local model Short Name opposed to the Namespace Name or Java Package Name.   

Environment

Gen 8.6 C# (.NET) and Java applications

Resolution

For Java (Package Name) and C# (Namespace Name), it will use the local short name if a model level Namespace Name or Java Package Name is not defined.  Specifically, this is for model objects that are not associated to a Business System.  This would include for example RI Triggers, Derivation Algorithms, and Elementary Processes.   

We recommend setting a Namespace Name or Java Package Name at the model level to prevent the compile output report from using the local model Short Name when errors occur.  This is set on the Toolset Model Generation Properties panel.  

 Here is where this is referenced in the Gen Technical Documentation:   Gen™ 8.6  > Developing > Designing > Using the Toolset > Model Generation Properties

Here is the panel within the Toolset where this is set.  You can get to this panel by selecting the 'Construction' menu item, then 'Generation', then 'Options' menu item, then 'Model Generation Properties' :