I'm using PRISM and a new control which I found in CodePlex: WPF Property Grid
While I was testing the DEMO, everthing going well.
I have not started using PRISM. If I put the control in a Shell, that also works well. The problem is if I put the control in a Module, it throws an error.
Could not load file or assembly 'WPG, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
I really have no idea about that error. Does anyone have an idea how to fix it?
EDIT:
<UserControl x:Class="ConfigurationManagerModule.Views.ConfigurationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prism="http://www.codeplex.com/prism"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wpg="clr-namespace:WPG;assembly=WPG"
>
And this user control is part of a Module
Make sure you have your references set right. I had this problem occur when Project B used an assembly (like WPG) in XAML, but Project A actually created the instance of a Project B class. Adding the WPG reference to Project A is necessary for the XAML parser to work in this way. Referencing Project B in Project A is not sufficient.
I had the same issue while working on Visual Studio 2010, SP1 and Team Server. The simplest solution (though it took a complete day of debugging) is to:
Sometimes, even if items are in source control, and you can see them, work upon them, and check-in/check-out; such intermittent issues are seen.
This is a fairly general error and is most often caused by the dynamic construction of elements. Whilst you have probably added the reference to the WPG assembly, it is necessary that all of its dependencies are also realised.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.