Metadata Service Exception: Option with ID -1 unknown
13. February 2013 Leave a comment
A colleague started to develop a report in Visual Studio and experienced a strange exception when selecting a query as dataset. It said that an exception occurred in the metadata service >SOMEFIELD option with ID -1 was not recognized
A look at the table being part of the query reveled the reason for this problem. The filed on the table is based on an extended datatype, but this datatype was deleted a while ago. However on a first look the field looks okay.
The table does compile without errors and incremental IL succeeds(!)
As soon as your select the fields enum property in the property window, you’ll see that the datatype is missing.
Set the compiler level up to 4 in order to get best practice errors displayed. It tells your that the field has an unknown type (BP:100) and that each field should be defined using a type.