I am trying to decipher how the toolbox filters 3.5 or 3.0 controls from
projects that target the 2.0 framework. We develop a set of Windows Forms
and Web Forms controls, and I noticed that almost all of the Web Forms
controls are filtered out, but none of the Windows Forms are filtered. By
this I mean that if I change my project's target framework version to 2.0,
the controls are no longer visible in the toolbox, but when I change it back
to 3.5 they are visible again.
This is neat and actually what I want, but I'm curious about what triggers
this. The single Web Forms control that is not filtered is in a different
assembly than the ones that are filtered, but they both have the same version
number. The assembly that contains the filtered controls does reference
System.Web.Extensions, but adding this reference to the other assemblies does
not do the trick. I have tried adding references to 3.5-specific DLLs, and
even tried adding calls to 3.5-only class methods. The only thing I know is
different is there are some ASP.NET AJAX controls in the Web Forms assembly,
but even the non-AJAX controls are being filtered from the toolbox.
I have played around in the past with creating DLLs with controls that
target different versions, and I seem to remember deciding that the
environment did not do this filtering, but it looks like something in the Web
Forms controls is triggering the behavior.
So, my question is what determines if an assembly is displayed in the
toolbox for a project that targets the 2.0 framework? I'm sure there's some
minor difference between the two assemblies that I'm overlooking, but so far
I haven't been able to find it. Is the process the toolbox uses to determine
if it should display an item documented somewhere? Is the behavior I'm
seeing not expected? Is there a recommended method to cooperate with this
functionality?
opellegr - 06 Feb 2008 20:44 GMT
I still haven't made any discoveries. Has anyone else experienced this?
> I am trying to decipher how the toolbox filters 3.5 or 3.0 controls from
> projects that target the 2.0 framework. We develop a set of Windows Forms
[quoted text clipped - 26 lines]
> seeing not expected? Is there a recommended method to cooperate with this
> functionality?