Hi,
I investigated into this issue, and it seems that PackageReference
project file element has some controls over how dependency packages effects are propagated to “parent” projects. Is uses IncludeAssets
/ExcludeAssets
/PrivateAssets
for that. See more about it here:
https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#controlling-dependency-assets
There, you can see values like compile
, analyzers
, etc. However, there is no tag value for designer toolbox population control. Setting PrivateAssets
to all
would help the toolbox issue, but that would effectively stop the Alternet assemblies from being copied to the application’s output directory, so that would not fit our needs.
Also a similar issue (but concerning DevExpress controls) apparently has been raised on Visual Studio support site:
https://developercommunity.visualstudio.com/t/toolbox-loads-all-devexpress-controls/317122
However, the only workaround suggested by MS support was:
via Tools->Options->Windows Forms Designer->Toolbox by setting Automatically Populate Toolbox to False.
This will turn off the NuGet toolbox auto-population for all packages altogether. Otherwise, that ticket was closed as “Lower Priority”.
I have created a new Visual Studio support ticket stating this problem here:
https://developercommunity.visualstudio.com/t/how-to-stop-visual-studio-toolbox-from-being-auto/1367122
In case I get any helpful feedback from MS, I will let you know in this thread.