Microsoft Visual Studio 2010 on Windows7 - VSIX Package
Version 10.0.30319.1 RTMRel
Microsoft .NET Framework
Version 4.0.30319 RTMRel
Installed Version: Ultimate
I've created a package and needed a pie-chart for visualization. So I downloaded the Feb release of WPF Toolkit. Added references to System.Windows.Controls.DataVisualization.Toolkit and WPFTookit. I've data bound the PieChart to a ViewModel / presenter
However when this property is changed, (i.e. items to show in the pie-chart), I get a FileNotFoundException
Could not load file or assembly 'WPFToolkit, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
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)
The FusionLog property shows me that it is looking for this DLL in the wrong place - in the parent folder of devenv.exe
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///W:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/WPFToolkit.DLL.
LOG: Attempting download of new URL file:///W:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/WPFToolkit/WPFToolkit.DLL.
LOG: Attempting download of new URL file:///W:/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/PublicAssemblies/WPFToolkit.DLL.
This dll is referenced by the VSIX Project and is present in the project output folder.
Next step: I tried putting this dll into the GAC and now the assembly load succeeds
c:\Program Files (x86)\WPF Toolkit\v3.5.40619.1>gacutil /i WPFToolkit.dll
Question: Why does this exception occur for only one of the referenced DLL? What is the right fix ? I'm thinking this will cause a problem for deployment via the VS extension manager.. I'd need something like a post-install step, which is something I'd like
to avoid (I would like the install to be as smooth as possible).Read more...