This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I created a basic WPF application, then I added a control from the Elements package, and afterwards a DiagramSurface. Simply running the application results in the following exception: The assembly with display name 'Mindscape.WpfDiagramming.Foundation.Aero' failed to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'Mindscape.WpfDiagramming.Foundation.Aero, Version=3.0.1315.22118, Culture=neutral, PublicKeyToken=c2e9c4ef235fd77f' or one of its dependencies. The system cannot find the file specified. I saw in another thread that this has been reported before, but noone could reproduce it. I presume there is a reference mixup, and when the Elements.Aero styles are being loaded it is mixing up the lookup names - or something like that. Even with both references in the project, there is only one ms namespace reference? Is that a problem somehow? How can we make these two products co-exist?
----EDIT----- I uploaded a test project. Just to be clear, this test project was created simply by dragging controls from the designer, that's it really. |
|
|
Wow. Now I am getting this problem even without Elements involved in the equation. I just recompiled the QuickStart.FlowDiagrams sample with the latest nightly build - in VC10 |
|
|
Hello Eliz Is this still a problem at your end? I tried your repro application and it compiled and ran perfectly fine. Both the slider and the DiagramSurface were present and working fine. (This means that yes you can use the same ms namespace to grab controls from both libraries). There is no Mindscape.WpfDiagramming.Foundation.Aero dll, and the word "Aero" is never used anywhere in the source code. It sounds like this is an issue caused by the environment. I assume WPF Diagrams used to work for you. Is there anything that has changed in your environment recently such as new installed software, changing themes or settings, or you've switched to a new machine altogether? Unfortunately as we have not run into this issue ourselves, I do not know how this problem could be solved. Let me know as you make progress. -Jason Fauchelle |
|
|
Did you enable Command Language Runtime Exceptions? I get this exception even when I just compile one of the samples. Looking in the output I see the following: 'ActivityDiagrams.vshost.exe' (Managed): Loaded 'E:\SeGen\EvaluateDiagrams\Mindscapetest\ActivityDiagrams\bin\Debug\Mindscape.WpfDiagramming.Foundation.dll' 'ActivityDiagrams.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GACMSIL\PresentationFramework.Aero\3.0.0.0_31bf3856ad364e35\PresentationFramework.Aero.dll' A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll Additional information: Could not load file or assembly 'Mindscape.WpfDiagramming.Foundation.Aero, Version=3.0.1876.23172, Culture=neutral, PublicKeyToken=c2e9c4ef235fd77f' or one of its dependencies. The system cannot find the file specified. So possibly it has something to do with loading the PresentationFramework, while in Aero mode. This may not be directly related to the diagram control exactly, but it is very annoying. And contrary to what some have said, it does happen in release as well. You may or may not be able to do anything about it, I don't know. In any case, this does not appear to have anything to do with mixing products. Although I have found something that does :) I have a control that has both a Diagram and a property grid control, and I get the following error when loading the window in the designer: Error 1 Ambiguous type reference. A type named 'MatchingTemplateSelector' occurs in at least two namespaces, 'Mindscape.WpfDiagramming.Foundation' and 'Mindscape.WpfElements'. Consider adjusting the assembly XmlnsDefinition attributes. E:\SeGen\EvaluateDiagrams\Mindscapetest\WpfApplication1\MainWindow.xaml I presume this is because there is only one namespace declaration for mindscape. Somehow miraculously this is resolving both Diagram and Property Grid namespaces. Yikes. It doesn't seem to be causing any problems at present - except that the designer doesn't load, but it is a bit scary. I'm not sure how to clarify the namespace declaration in this case. Any suggestions? xmlns:ms="http://namespaces.mindscape.co.nz/wpf" |
|
|
Hello Eliz I did not have Command Language Runtime Exceptions enabled, but when I did enable this, indeed this error occurs. Unfortunately there is no stack trace, and I have no idea why something is searching for a dll that doesn't exist. I did a little bit of searching but any of the potential solutions I tried still did not work. I do not know much about it, but could you just disable the Command Language Runtime Exceptions? I do not have any other suggestions for this - I hope you can find a solution. Yes, there are a few classes that are duplicated between WPF Diagrams and WPF Elements. To solve this, you should just be able to setup a namespace reference that targets the one that you want to use the class from, and then use that namespace reference to use the classes. Something like this in xaml:
-Jason Fauchelle |
|
|
Regarding the exceptions, yes turning off the CLR exceptions hides the problem. Although, it doesn't make it go away. And exceptions don't exactly help performance. And of course during any serious debugging session any extraneous exceptions are annoying. I'm not sure what any one else has done about this problem, because it seems to be 'a thing' when using Aero styles. I haven't seen anything about this on msdn so far. Perhaps the real answer to the problem is with Microsoft. If I see anything further I'll post more. Namespaces: So I will have to abandon the use of the namespace declaration that is automatically added in the designer, and declare them all manually. Oh well. I was hoping for a sneaky trick, but I suppose that will work. Thanks |
|
|
I would certainly like to know what can be done about the Aero problem. And yes, declaring the namespaces manually is unfortunately the only way to go due to the shared classes. -Jason Fauchelle |
|