我有一个针对.net 4.6和Dapper 1.50.4的WPF / MVVM Light应用程序 我正在使用Visual Studio Pro 2017来开发应用程序
这个应用程序正在运行,但我有一台新计算机并将此应用程序的开发移至新计算机。当我尝试在我的新计算机上运行此应用程序时,我收到以下错误:
System.IO.FileLoadException:'无法加载文件或程序集'Dapper, Version = 1.50.4.0,Culture = neutral,PublicKeyToken = null'或其中一个 依赖。需要一个强名称的程序集。 (例外 HRESULT:0x80131044)'
The operation failed. Bind result: hr = 0x80070002. The system cannot find the file specified. Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Running under executable C:\Users\jorda\...\bin\Debug\FTC_Application.exe --- A detailed error log follows. === Pre-bind state information === LOG: DisplayName = System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e (Fully-specified) LOG: Appbase = file:///C:/Users/jorda/.../bin/Debug/ LOG: Initial PrivatePath = NULL LOG: Dynamic Base = NULL LOG: Cache Base = NULL LOG: AppName = FTC_Application.exe Calling assembly : GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Users\jorda\...\bin\Debug\FTC_Application.exe.Config LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: Post-policy reference: System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///C:/Users/jorda/.../bin/Debug/System.Windows.DLL. LOG: Attempting download of new URL file:///C:/Users/jorda/.../bin/Debug/System.Windows/System.Windows.DLL. LOG: Attempting download of new URL file:///C:/Users/jorda/.../bin/Debug/System.Windows.EXE. LOG: Attempting download of new URL file:///C:/Users/jorda/.../bin/Debug/System.Windows/System.Windows.EXE. LOG: All probing URLs attempted and failed.
将此解决方案移至另一台计算机显然有些问题,但我不确定在何处追踪它。
有人可以帮我弄清楚为什么我在项目中调用dapper时遇到此错误,或者帮我修复它?
提前致谢
答案 0 :(得分:5)
所以我没有意识到有一个强名称和非命名的dapper版本。事实是我对签署的集会并不是很了解。