Skip to main content
Home Forums Silverlight Programming Report a Silverlight Bug BUG SL2: Using any control from March 2009 toolkit in user control in class library crushes the app
1 replies. Latest Post by arrgh on June 19, 2009.
(0)
silverbyte
Participant
1338 points
405 Posts
06-05-2009 9:11 AM |
Hello,
If you use any controls from toolkit in a class library referenced by an application, without the application having the toolkit as a reference, the application throws AG_E_PARSER_BAD_TYPE error
If I add the toolkit as a reference to the app, it works.
I am using the latest toolkit (March 2009): C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Toolkit\March 2009\Libraries\System.Windows.Controls.Toolkit.dll, v2.0.50727
Silverlight 2
Visual Studio 2008
Windows XP SP3.
Steps to reproduce are very simple:
1. Create an application and a class library
2. add a user control to the class library
3. add toolkit (System.Windows.Controls.Toolkit) reference to the library
4. add any toolkit control (Expander for instance) to the user control
5. run the app
Now if you add the toolkit reference to the app, it doesn't crush anymore.
It just took me 2.5 hours to realize this and I am supposed to deliver an app to the customers in 3 hours from now.
Why there isn't any list with current known bugs, categorized by class?
arrgh
Member
21 points
14 Posts
06-19-2009 5:48 PM |
The error reporting from Silverlight is pretty bad, I'll agree with that. But it's not unreasonable to have to reference the Toolkit assemblies in the application. After all they're just that: references. It's not ripping out all the code from the Toolkit assemblies and putting into your class library, nor should it.