After publishing Upgraded several packages for Episerver 11, it became apparent that something has changed. Ben explained well this Feature, not a bug, which should have worked in the same way with previous versions of Episerver.
Now, I've updated all the mentioned add-ons to include web.config transforms. It is really easy to accomplish this: it's enough to create install and uninstall xdt files, see web.config.install.xdt and the copying to modules in nuspec:
<file src="web.config.install.xdt" target="content" /> <file src="web.config.uninstall.xdt" target="content" />
As a result when you inspect your nuget package with NuGet Package Explorer, you should see these files in the content folder. When you install the package, you should get the reference to your addon in protectedModules:
<episerver.shell> <protectedModules rootPath="~/EPiServer/"> <add name="AddOn.Initial" /> </protectedModules> </episerver.shell>
To make this easier for those who are getting started with building their add-ons, I have updated my getting started package with:
Happy Add-Ons development!