I have an issue where performing a Rebuild of my Solution causes an exception when I call OdbFactory.Open. Here is what I've found:
- If I start with no database created, the application opens fine.
- As long as I keep using the same version of the application, the application opens fine.
- As soon as I do a Rebuild Solution, I can no longer open the database. I receive a KeyNotFoundException (stack trace below) when performing CheckMetaModelCompatibility.
- One issue may be that my assembly version configuration is set to "1.3.*", which means that subsequent builds will have different full names for the assemblies, given the inclusion of version number. I suspect this is what's causing problems when
trying to validate that the currently loaded types match the types found in the database.
- I've enabled logging and the last entry in the log before the exception is "ObjectReader: Current Meta Model is :System.Collections.Generic.Dictionary`2+ValueCollection[System.String,NDatabase.Odb.Core.Layers.Layer2.Meta.ClassInfo]"
- On a side note, I notice that the database is registering type information for "System.Reflection.RtFieldInfo" and a bunch of other System.Reflection and System.Runtime classes. I'm not sure if this is expected or if one of my classes is somehow
causing these to be referenced.
Any help would be greatly appreciated. This database solution is much cleaner and more lightweight than what I was using previously and I'd really like to get this to work.
2 currentCIs) in c:\TeamCity\buildAgent\work\5f9a44f79ee7a25c\src\Odb\Core\Layers\Layer3\Engine\StorageEngine.cs:line 111
at NDatabase.Odb.Core.Layers.Layer3.Engine.StorageEngine..ctor(IDbIdentification parameters) in c:\TeamCity\buildAgent\work\5f9a44f79ee7a25c\src\Odb\Core\Layers\Layer3\Engine\StorageEngine.cs:line 88
at NDatabase.Odb.Main.Odb..ctor(String fileName) in c:\TeamCity\buildAgent\work\5f9a44f79ee7a25c\src\Odb\Main\Odb.cs:line 14
at NDatabase.Odb.Main.Odb.GetInstance(String fileName) in c:\TeamCity\buildAgent\work\5f9a44f79ee7a25c\src\Odb\Main\Odb.cs:line 26
at NDatabase.Odb.OdbFactory.Open(String fileName) in c:\TeamCity\buildAgent\work\5f9a44f79ee7a25c\src\Odb\OdbFactory.cs:line 22