Adding references automatically

  • Thread starter Thread starter Iulian Ionescu
  • Start date Start date
I

Iulian Ionescu

I know that whenever you drop a control onto a form the
reference to the assembly that exports the control is
automatically added to the references. How about the
satelite assembly though? I have the following situation:
one control has a collection property; the collection is
derived from CollectionBase but it is declared in another
assembly (Tools). I wrote a custom code serializer for
this property only, but at this line:

form1.mycontrol1.Items.Add(...)

the compiler sais that "ExtendedCollection is declared in
an assembly that is not referenced". Which is true, the
reference to the Tools assembly is not automatically
added when I drop the mycontrol on the form... Is there a
way I can force that?

Also, is there a way to add a using line from the
designer? For instance i want to add this:

using MyCompany.SomeNamespace.Tools

into the using section of the form that the control is
dropped on. Is it possible?

thank you!
Iulian
 
I don't know the answer, but I would be careful adding a "using" line from
the designer even if it is possible. You need to make sure that it adds
correct syntax for the language the user is using (using, imports, etc.).

Jerry
 
Back
Top