I have my UpgradeHandler written in the Model assembly. In order to organize my code better I moved it to a Services assembly. Then I got the message that I can not upgrade to a newer schema version. I set breakpoints in my UpgradeHandler class constructor and CanUpgradeFrom method. I found out that constructor was called (I conclude that my handler was found and recognized) but then I saw that my CanUpgradeFrom wasn't called, meanwhile my scheme cannot be upgraded with a stack trace: Xtensive.Orm.DomainBuilderException: Upgrade of assembly 'GRC.Model' from version '1.45.1187.13623' to '1.45.0.0' is not supported. в Xtensive.Orm.Upgrade.SystemUpgradeHandler.CheckAssemblies() в Xtensive.Orm.Upgrade.SystemUpgradeHandler.OnBeforeStage() .... How would you recommend me to debug this issue of mine? Is there a default upgrade handler that got executed and did return false? |
Hello Kirill, Look at the properties of UpgradeHandler. There are Assembly and AssemblyName property, By default they return the assembly where the UpgradeHandler is declared and the assembly name, but you can write your own algorithm because they are virtual. When your Upgrade handler was in the Model assembly everything worked fine because these two properties returned Model assembly and its name, when you moved it to Services these two properties started returning Services assembly and its name. By implementing the properties you can make it work correctly and return Model assembly. |