WPF Designer Extension

Topics: General
Apr 1, 2013 at 9:28 AM
How do I package up a WPF Designer dll into a nuget package?

To add a designer extension you need to create a separate assembly named <Assembly>.VisualStudio.Designer.dll and place it besides te <Assembly>.dll. When I do this with nuget's <file> element into the lib folder, it adds a reference to it, which causes issues...

How do I do this?

Matthijs ter Woord
Apr 2, 2013 at 2:31 AM
I don't think NuGet should take care of the design time support assemblies (WPF or not).

Such design time assemblies should be installed to Visual Studio via MSI or VSIX. Therefore, they should never appear in a NuGet package.

If you bundle the MSI or VSIX in your nuget package, performing installation via install.ps1 might be technically possible (I did not try), but I rather keep it a separated process to avoid user confusion. Some of your users might feel it is ok to install extra bits while they install the NuGet package, but some might have serious concerns (such as enterprise users).
Apr 2, 2013 at 6:11 AM
I think the .VisualStudio.Designer.dll files (there are similar files for Silverlight/windows store i think) are just like the .resources.dll satellite assemblies. They should be copied by nuget in the same folder as the normal .dll (or specific subfolder for language-specific satellites), but nuget should not add references.

One of the key parts of the VisualSTudio.Designer.dll tricks is that you dont need to install anything to extend the designer. NuGet not supporting this, would basically mean nuget is useless for control assemblies which provide designtime support. (Which most controls do)