Quantcast
Channel: MVVM Light Toolkit
Viewing all articles
Browse latest Browse all 1826

Closed Issue: TypeInitializationException on RelayCommand after upgrading to 4.1.27.1 [7602]

$
0
0
Hello, recently I upgraded MVVMLight(Portable) from 4.1.24-beta2 to 4.1.27.1 and Portable.CommonServiceLocator is automatically upgraded from 1.2 to 1.2.2 automatically by nuget.

The above is the only changes I have and now here comes a TypeInitializationException on constructor of RelayCommand:

System.TypeInitializationException occurred
Message=“GalaSoft.MvvmLight.Command.RelayCommand”的类型初始值设定项引发异常。
TypeName=GalaSoft.MvvmLight.Command.RelayCommand
StackTrace:
位于 GalaSoft.MvvmLight.Command.RelayCommand..ctor(Action execute, Func`1 canExecute)
位于 MyXXXViewModel.SetupCommands()
InnerException: System.IO.FileLoadException
Message=未能加载文件或程序集“GalaSoft.MvvmLight.Platform.SL4, Version=4.1.26.30523, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。请求的程序集版本与应用程序域中已经绑定或清单中指定的程序集版本冲突。 (异常来自 HRESULT:0x80131053)
StackTrace:
位于 System.Reflection.RuntimeAssembly._nLoad(AssemdsafblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
位于 System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
位于 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
位于 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
位于 System.Reflection.Assembly.Load(String assemblyString)
位于 System.Func`2.Invoke(T arg)
位于 GalaSoft.MvvmLight.Internal.ProbingAdapterResolver.ProbeForPlatformSpecificAssembly(String platformName)
位于 GalaSoft.MvvmLight.Internal.ProbingAdapterResolver.ProbeForPlatformSpecificAssembly()
位于 GalaSoft.MvvmLight.Internal.ProbingAdapterResolver.GetPlatformSpecificAssembly()
位于 GalaSoft.MvvmLight.Internal.ProbingAdapterResolver.Resolve(Type type)
位于 GalaSoft.MvvmLight.Internal.PlatformAdapter.Resolve[T](Boolean throwIfNotFound)
位于 GalaSoft.MvvmLight.Command.RelayCommand..cctor()
InnerException:

I am sorry for the Chinese characters in the message but I wish the rest of the information could help. Thanks.

Viewing all articles
Browse latest Browse all 1826

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>