Nuget Package with AutomaticMigrationPlan failing to get embedded package.xml file

I recently tried to create a Nuget package which had the sole purpose of creating some doctypes on the target installation. For testing purposes, I created a “dummy” doctype without any dependencies in an existing Umbraco setup, got the package.xml file and went on to create an automatic package migration as described here: Creating a package - Our Umbraco

When I try to install the package on a new Umbraco site, though, I get the message “Missing embedded files for planType:” - I made sure I had included the package.xml file as an embedded resource, and also made a zip and added that as well. I can’t make it work.

I even switched to a custom migration - this time it was set up, but during running the new Umbraco site I got an “object reference not set to an instance of an object”. Again, it seemed like it couldn’t find the embedded resource.

What am I missing? I have seen others doing the same (searched for code on GitHub) in exactly the same way. Must be something extremely silly!


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/109943-nuget-package-with-automaticmigrationplan-failing-to-get-embedded-packagexml-file