2.1.0.5903
Windows 10
I've posted the question already here in the Forum, but got no answer so far:
https://forum.dynamobim.com/t/how-to-properly-use-migrations-xml-with-a-zerotouch-nodes-package/25199
Basically, I have followed the steps in https://github.com/DynamoDS/Dynamo/wiki/Zero-Touch-Plugin-Development#migrations to set up a migrations.xml file. But even though the file name, the file location, and the given package paths are correct, the nodes in question in the node tree are being shown as "Unresolved" when I open the Dynamo file.
no errors, node tree should continue to work
unresolved nodes
@aliasguru can you confirm what type of file you are trying to migrate - a json or xml based file?
I'm not sure JSON files will be able to migrate at this point. I think it was an oversight that remained when we transitioned to json that migration was not required because we only had one released version of dynamo that would create json files.
But this does not take into account packages which might migrate between dynamo versions. 馃槵 .
@Racel @QilongTang
@mjkkirschner Hm that would start to make sense. I'm not trying to migrate from an old Dynamo version. In fact, I only want to change a namespace. I had placed a node in a certain package, and now want to move it to a different one. My understanding of the migration was that it would be evaluated any time I open a node tree, instead of only if the Dynamo version which the node tree was created in differs from the version that it is opened with. It's just because the node trees I'm testing my nodes with can become complex, and it's tedious to re-hook all those unresolved nodes.
Tracked internally as QNTM-5547
@erfajo this sounds correct - but should be fixed in next release:
https://github.com/DynamoDS/Dynamo/pull/9306
please reopen if this is not fixed for you in 2.1.
So I've followed the instructions in here but no dice either.
My nodes and script were created for 2.0.2. Then I renamed some classes and created the migration.xml file. However, when I open it in Dynamo 2.1 (with Revit 2020) the nodes in the script do not migrate and are unresolved.
Furthermore, the documentation is confusing, since this Wiki says:
Migration files should be named in the following format: BaseDLLName.Migrations.xml.
while this page says:
ZeroTouch nodes use a Namespace.Migrations.XML file located in the packages bin folder such as
So which one is it: the name of the DLL or the Namespace?
Thanks ahead of time for your help.
looks like it uses the library name:
https://github.com/DynamoDS/Dynamo/blob/5bafc553476cd7efa1b37c31d35925754538617a/src/DynamoCore/Library/LibraryServices.cs#L659
I would use the filename of the dll - for a lot of our internal migrations it's not super clear because they are the same - but glancing at the code looks like dll name to me -
can you post your migration file? Are you making a package? Where is your migration when you load your dll? How are you loading your dll etc.
Thanks for the reply @mjkkirschner .
I'm making a ZeroTouch node and loading it by simply having it in %appdata%/Dynamo/Dynamo Revit/2.0/packages with a pkg.json file.
My migration file is in exactly the same folder as my dll:

My migration file looks something like this:

Do you think that it's because I'm loading it directly by putting it in "packages" that it's not migrating?
try this -
Thanks @mjkkirschner , my dll and migration.xml are both in the /bin folder.
I am indeed loading the package by having the path in "Manage Nodes and Package paths":

I was doing it this way to facilitate & expedite debugging and deployment of the ZeroTouch node.
But are you are saying that migrations will not work if we are loading the package this way? I thought this was the official way to load them?
Most helpful comment
@erfajo this sounds correct - but should be fixed in next release:
https://github.com/DynamoDS/Dynamo/pull/9306