Is the WPF Toolkit MSI supposed to install the DLLs in the GAC

Aug 25, 2010 at 8:05 PM

I'm not sure if the issue is due to me using the Chart controls in a VSIX project so I posted it first there. I've verified that the issue doesn't occur in a WPF app project.

http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/a04b45d2-1d0a-4cfc-a0f0-1d458b2d6e26

I've referenced DataVisualization.Toolkit and WPFToolkit in my Project. Dropped a chart control onto the toolwindow and bound it to a List property of a ViewModel class. When the property/collection is populated for the first time- it fails with a FileNotFoundException for WPFToolkit.dll

FusionLog property of the exception indicates that it is looking for the DLL in the devenv.exe folder.

I got it to work only after installing the WPFToolkit in the GAC but I'm looking for a better solution.

StackTrace:

   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at System.Windows.Baml2006.Baml2006SchemaContext.ResolveAssembly(BamlAssembly bamlAssembly)
   at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlTypeToType(BamlType bamlType)
   at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType bamlType, Int16 typeId)
   at System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16 typeId)
   at System.Windows.Baml2006.Baml2006SchemaContext.GetProperty(Int16 propertyId, XamlType parentType)
   at System.Windows.Baml2006.Baml2006Reader.Process_PropertyArrayStart()
   at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
   at System.Windows.Baml2006.Baml2006Reader.ReadObject(KeyRecord record)
   at System.Windows.ResourceDictionary.CreateObject(KeyRecord key)
   at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.FetchResource(Object resourceKey, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
   at System.Windows.SystemResources.LookupResourceInDictionary(ResourceDictionary dictionary, Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
   at System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
   at System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)
   at System.Windows.FrameworkElement.UpdateThemeStyleProperty()
   at System.Windows.FrameworkElement.OnInitialized(EventArgs e)
   at System.Windows.FrameworkElement.TryFireInitialized()
   at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
   at System.Windows.FrameworkElement.AddLogicalChild(Object child)
   at System.Windows.Controls.UIElementCollection.InsertInternal(Int32 index, UIElement element)
   at System.Windows.Controls.UIElementCollection.Insert(Int32 index, UIElement element)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.AddDataPoint(DataPoint dataPoint)
   at System.Windows.Controls.DataVisualization.Charting.PieSeries.AddDataPoint(DataPoint dataPoint)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.AddObject(Object dataContext)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.LoadDataPoints(IEnumerable newItems, IEnumerable oldItems)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.Refresh()
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)
   at System.Windows.Controls.DataVisualization.Charting.DataPointSeries.OnItemsSourceChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)

<snipped>

Aug 26, 2010 at 7:05 AM

Hi,

Can someone please confirm that the MSI install registers the Toolkit dlls into the GAC ? 

I've installed the Feb 2010 release on a Win7 and a WinXP machine and in both cases the GAC doesn't contain the WPFToolkit dll - which is causing a bit of pain for me. An MSFT who responded to my query on the VS Extensibility forums replied that for her, the same installs added the DLLs into the GAC.

Thanks.