How to properly use Migrations.XML with a ZeroTouch nodes package?

#1

Hi there,

I’ve got an issue with providing a proper Migrations.XML for my ZeroTouch nodes. What I’ve done is moving a node from one Category (Patterns.Lists) to another (Utilities.List), keeping the name of the node. I’m now providing the XML like this:

<?xml version="1.0"?>
<migrations>
  <priorNameHint>
    <oldName>KiskaDynamoZTNodes.Patterns.Lists.CondenseList</oldName>
    <newName>KiskaDynamoZTNodes.Utilities.List.CondenseList</newName>
  </priorNameHint>
  <priorNameHint>
    <oldName>Autodesk.DesignScript.Geometry.KiskaDynamoZTNodes.Patterns.Lists.CondenseList</oldName>
    <newName>Autodesk.DesignScript.Geometry.KiskaDynamoZTNodes.Utilities.List.CondenseList</newName>
  </priorNameHint>
</migrations>

The filename is KiskaDynamoZTNodes.Migrations.xml, and it is located in the same folder as the KiskaDynamoZTNodes.dll

As far as I can tell, I have followed the instructions on https://github.com/DynamoDS/Dynamo/wiki/Zero-Touch-Plugin-Development#migrations and my XML is a modified copy of the ProtoGeometry one. But the updated node is not detected when I open a node tree that contained the old one.

0 Likes

Is it possible to have multiple versions of Node Packages?
#2

And the assembly name is the same!?

If you rename the assembly, then this must also be added the migration

example

  <priorNameHint>
    <oldName>Orchid.Core.Directory.ContentsAll</oldName>
    <newName>Orchid.Generic.Core.Directory.ContentsAll</newName>
    <additionalAttributes>
      <attribute>
        <name>assembly</name>
        <value>OrchidGeneric.dll</value>
      </attribute>
    </additionalAttributes>
  </priorNameHint>
0 Likes

#3

Yes, the assembly name is the same. I’ll try adding that attribute to the XML regardless and see if it changes anything.

0 Likes

#4

is your code hosted at GitHub? It is easier to verify it then

0 Likes

#5

it’s a private Repo on Bitbucket. I can grant access to you if you provide me a mail address.

0 Likes

#6

In that case, then try to see my package if that can help you, I have made many complex migrations, and are going to reveal one very soon… working on the last part now.

0 Likes

#7

ok cool. I’ve tried adding the additionalAttribute as well, still no luck. Maybe it’s the way I installed the package? I’ve used File -> Import Library to do that. The full path was added to the ‘Manage node and Package Paths’ preferences correctly.

0 Likes

#8

dont you use a pkg.json file? and have it hosed where you have your other packages?

0 Likes

#9

no I don’t. Where can I find info about this?

0 Likes

#10

This should be included in the zero touch demo on DynamoDS Github. If you use the package manager it will built it for you. you can release you package as an internal package.

just another thing, you have not added comments in the xml file!?

could you upload your xml file, just to check it?

0 Likes

#11

I’ll try that as soon as I can. No, I haven’t used any comments, as I ran into your bug report regarding that issue. Thanks for all your support so far.

0 Likes

#12

KiskaDynamoZTNodes.Migrations.xml.txt (951 Bytes)

Here’s the XML. I’ve added the .txt extension purely because the upload tool would not allow me to upload .XML files (extension is blocked)

0 Likes

#13

folder

Screenshot of the folder where my .dll is located

0 Likes

#14

looks fine… and they are all in the bin folder?

changed how the additionalAttribute are included…

KiskaDynamoZTNodes.Migrations.xml.txt (1.4 KB)

0 Likes

#15

didn’t help unfortunately. Guess I need to try using the .json approach

0 Likes

#16

you can get the structure and the json file from my github if that can help you

0 Likes

#17

not a chance. Also with the pkg.json, the folder setup, setting that folder in the Dynamo options, etc, the nodes are not upgraded correctly. I’m running out of ideas on what could be wrong.

0 Likes

#18

I have a follow upon this one…

0 Likes

#19

Can confirm this is still an issue, have tested today with Dynamo 2.3. It’s not a show-stopper, but certainly inconvenient having to change the whole node tree every time a node changes its location within classes.

0 Likes

#21

See commit https://github.com/DynamoDS/Dynamo/commit/4606fdc7ccfce6d91f68899716f889de66776d8f

0 Likes