无法加载文件或程序集 'GalaSoft.MvvmLight.Platform, PublicKeyToken=null' 或其依赖项之一
Could not load file or assembly 'GalaSoft.MvvmLight.Platform, PublicKeyToken=null' or one of its dependencies
我遇到了一个恼人的问题。在我开始使用之前,一切都很顺利。但是今晚当我试图引入我的视图时(这是一个 WPF Window)
<i:Interaction.Triggers>
<i:EventTrigger
EventName="SelectionChanged">
<mvvm:EventToCommand
Command="{Binding OnCategoryChangedCommand}"
CommandParameter="{Binding SelectedItem, ElementName=comboBoxCategory}" />
<!--todo 数据绑定写入绑定源先触发?还是事件触发器先触发?-->
</i:EventTrigger>
</i:Interaction.Triggers>
忽略中文内容。 :)
我已经像这样正确地引入了正确的名称空间:
xmlns:mvvm="http://www.galasoft.ch/mvvmlight"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
而我成功建造。
我开始调试(这个项目不是 WPF 应用程序,它是一个 Autodesk 加载项开发项目。所以调试从 Autodesk 软件开始)。
我单击一个按钮来触发我的 Window,然后立即抛出一个异常:
Could not load file or assembly 'GalaSoft.MvvmLight.Platform, PublicKeyToken=null' or one of its dependencies.
你可以看到"PublicKeyToken=null",因为我第一次遇到这个问题,我google了一下这个问题,得到了换成MVVMLightStd10的解决方案。我试过了,还是出现上面的异常。谁能帮忙?非常感谢!
最近在 Revit API discussion forum, e.g., missing System.ComponentModel.Annotations v4.2.0.0 中讨论了几个类似的问题。
这是该解决方案的编辑版本,以及 The Building Coder 在 Loading Add-In Support DLLs 上进一步提供的指示。
我遇到了一个恼人的问题。在我开始使用之前,一切都很顺利。但是今晚当我试图引入我的视图时(这是一个 WPF Window)
<i:Interaction.Triggers>
<i:EventTrigger
EventName="SelectionChanged">
<mvvm:EventToCommand
Command="{Binding OnCategoryChangedCommand}"
CommandParameter="{Binding SelectedItem, ElementName=comboBoxCategory}" />
<!--todo 数据绑定写入绑定源先触发?还是事件触发器先触发?-->
</i:EventTrigger>
</i:Interaction.Triggers>
忽略中文内容。 :) 我已经像这样正确地引入了正确的名称空间:
xmlns:mvvm="http://www.galasoft.ch/mvvmlight"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
而我成功建造。 我开始调试(这个项目不是 WPF 应用程序,它是一个 Autodesk 加载项开发项目。所以调试从 Autodesk 软件开始)。 我单击一个按钮来触发我的 Window,然后立即抛出一个异常:
Could not load file or assembly 'GalaSoft.MvvmLight.Platform, PublicKeyToken=null' or one of its dependencies.
你可以看到"PublicKeyToken=null",因为我第一次遇到这个问题,我google了一下这个问题,得到了换成MVVMLightStd10的解决方案。我试过了,还是出现上面的异常。谁能帮忙?非常感谢!
最近在 Revit API discussion forum, e.g., missing System.ComponentModel.Annotations v4.2.0.0 中讨论了几个类似的问题。
这是该解决方案的编辑版本,以及 The Building Coder 在 Loading Add-In Support DLLs 上进一步提供的指示。