Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrations.XML is not working #9076

Closed
aliasguru opened this issue Aug 30, 2018 · 10 comments
Closed

Migrations.XML is not working #9076

aliasguru opened this issue Aug 30, 2018 · 10 comments
Labels
2.x Issues related to 2.x versions of Dynamo. tracked

Comments

@aliasguru
Copy link

Dynamo version

2.1.0.5903

Operating system

Windows 10

What did you do?

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.

What did you expect to see?

no errors, node tree should continue to work

What did you see instead?

unresolved nodes

@mjkkirschner
Copy link
Member

@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

@aliasguru
Copy link
Author

@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.

@johnpierson johnpierson added 2.x Issues related to 2.x versions of Dynamo. needs more info Needs more information from the reporter. labels Sep 27, 2018
@johnpierson
Copy link
Member

Tracked internally as QNTM-5547

@johnpierson johnpierson added tracked and removed needs more info Needs more information from the reporter. labels Nov 21, 2018
@mjkkirschner
Copy link
Member

@erfajo this sounds correct - but should be fixed in next release:
#9306

@mjkkirschner
Copy link
Member

please reopen if this is not fixed for you in 2.1.

@vinnividivicci
Copy link

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.

@mjkkirschner
Copy link
Member

looks like it uses the library name:

string migrationsXMLFile = Path.Combine(Path.GetDirectoryName(fullLibraryName),

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.

@vinnividivicci
Copy link

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:
image

My migration file looks something like this:
image

Do you think that it's because I'm loading it directly by putting it in "packages" that it's not migrating?

@mjkkirschner
Copy link
Member

try this -

  1. make sure that your dll is not being loaded from the node and package path settings dialog. Remove it from that set of paths if it's there.
  2. I can't tell from your image, but make sure your node dll and the migrations are in the /bin folder of your package, and that you have a package.json that points to that dll etc.

@vinnividivicci
Copy link

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":
image

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issues related to 2.x versions of Dynamo. tracked
Projects
None yet
Development

No branches or pull requests

4 participants