472,144 Members | 1,931 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,144 software developers and data experts.

Design-time and run-time component assemblies

In Borland's VCL it was possible to divide a component into design time and
run time DLLs. The design time DLL would only be necessary when the
programmer was setting a component's properties or events in the Object
Inspector, the equivalent to the VS .NET Windows form designer. The run-time
DLL would only contain the code necessary at run-time. The design time DLL
referenced the run-time DLL, but not vice-versa. This allowed the run-time
DLL only to be shipped to end-users of a module. The design time DLL was
only used by programmers who "designed" the component in their own code.

Why was this a good thing ? It was because the code pertaining to the RAD
design time system did not have to be included at run-time when the
component was executed, and therefore did not have to be shipped to
end-users as opposed to end-programmers. The run-time DLL was therefore
smaller and less bloated with unnecessary code.

It does not appear this is possible in .NET. I can still certainly divide my
component into two different assemblies, one for run-time code and one for
design-time code, which is what I would anyway as a matter of cleaner design
from my point of view. But it seems there are two reasons that I can not
make a clean division, such that both assemblies need to be available at
design time while the run-time assembly only needs to be available at

The first reason is that the classes I use for my design time code, derived
from System.ComponentModel, do not necessarily only pertain to design time
functionality. According to the documentation on type converters, as an
example, they might apply both to design time and run-time.

Secondly to use the classes in my design time assembly at design time, I
must provide attributes for the types and properties to which the
design-time classes pertain and, if the attributes refer to classes in
another assembly, they must reference that other assembly. This effectively
ties my run-time assembly to these classes which I only want to use at
design time.

Has this issue been addressed or discussed anywhere ? It does seem to me
wasteful that .NET classes which I create only for design time functionality
needs to be distributed to the end-user by a programmer who uses my
component, even though the end-user will never need the functionality.
Furthermore I see no way to tell .NET that the classes which I create for
design-time functionality should only be used at design time and not

Because of these issues, I have a feeling that there must be a way to create
a design time assembly for my component which does not have to be
unnecessarily shipped to end-users for run-time execution. Does anybody know
how to do this ?
Nov 17 '05 #1
0 1762

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

43 posts views Thread by grz02 | last post: by
3 posts views Thread by zlst | last post: by
13 posts views Thread by John Salerno | last post: by
16 posts views Thread by sailor.gu | last post: by
2 posts views Thread by Paul Cheetham | last post: by
6 posts views Thread by JoeC | last post: by
9 posts views Thread by Grizlyk | last post: by
19 posts views Thread by neelsmail | last post: by
8 posts views Thread by indrawati.yahya | last post: by
reply views Thread by Saiars | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.