WPF项目中的MVVMLight 4.3.31.28629,VS2013 MVVMLight安装(通过nuget)添加了Microsoft.Practices.ServiceLocation 1.2.0.0 检查MvvmLight.Extras.WPF4,我发现这个:
我的应用程序在调试器中运行,但不是从命令行启动时。 (它从ViewModelLocator ctor抛出异常,试图找到Microsoft.Practices.ServiceLocation 1.0.0.0。)
为什么它在调试器内部运行,如何修复它以在调试器外部运行?
谢谢 -
更新
我勒个去?为什么引用同一程序集的两个版本?
at ProdoMetro.ViewModel.ViewModelLocator..ctor()
InnerException: System.IO.FileLoadException
HResult=-2146234304
Message=Could not load file or assembly **Microsoft.Practices.ServiceLocation, Version=1.2.0.0**, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source=TimerDoro
FileName=Microsoft.Practices.ServiceLocation, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
FusionLog=""
StackTrace:
at ProdoMetro.ViewModel.ViewModelLocator..cctor()
InnerException: System.IO.FileLoadException
HResult=-2146234304
Message=Could not load file or assembly **Microsoft.Practices.ServiceLocation, Version=1.0.0.0**, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
FileName=Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
FusionLog==== Pre-bind state information ===
LOG: DisplayName = Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(完全指定的)