C# 模块应包含程序集清单

C# 模块应包含程序集清单,c#,wpf,C#,Wpf,我有一个项目在VisualStudio2013中运行良好,它是用C#编写的,使用WPF。此项目有几个依赖项: GalaSoft.MvvmLight工具包 Json Xceed.Wpf.Toolkit 昨晚之前,该项目一直工作良好,运行良好,能够顺利调试。然而,昨天晚上,当我决定在这个项目上工作时,我打开并尝试编译然后调试。当应用程序试图通过调试器运行时,我收到: 尝试运行项目时出错:无法加载文件或程序集“MyProjectName”或其依赖项之一。模块应包含程序集清单。 基于其他问题和谷歌,

我有一个项目在VisualStudio2013中运行良好,它是用C#编写的,使用WPF。此项目有几个依赖项:

  • GalaSoft.MvvmLight工具包
  • Json
  • Xceed.Wpf.Toolkit
昨晚之前,该项目一直工作良好,运行良好,能够顺利调试。然而,昨天晚上,当我决定在这个项目上工作时,我打开并尝试编译然后调试。当应用程序试图通过调试器运行时,我收到:

尝试运行项目时出错:无法加载文件或程序集“MyProjectName”或其依赖项之一。模块应包含程序集清单。

基于其他问题和谷歌,我尝试了一些事情:

  • 清洗溶液和重建没有帮助
  • 重命名项目没有帮助
  • 依赖项和项目中没有名称冲突
  • 构建为AnyCPU在调试器中工作,但我特别尝试使用x86
另一件需要注意的事情是,编译后的二进制文件在VisualStudio之外运行良好。它只是拒绝在VS中调试。这对我来说没有意义,它在VS之外运行良好,没有错误,但在它内部抛出错误,没有附加信息

调试输出不包含任何有用的错误信息

在运行Build->Clean之后编译提供:

    1>------ Rebuild All started: Project: MyProjectName, Configuration: Debug x86 ------
    1>  MyProjectName -> <Path Stripped>\MyProjectName.exe
    ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
1>----已启动全部重建:项目:MyProjectName,配置:调试x86------
1> MyProjectName->\MyProjectName.exe
=========全部重建:1成功,0失败,0跳过==========
尝试调试x86版本将提供:

    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded '<Path Stripped>\MyProjectName.vshost.exe'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll'
    A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.VisualStudio.HostingProcess.Utilities.dll
    The thread 'vshost.NotifyLoad' (0x15c8) has exited with code 0 (0x0).
    The thread 'vshost.LoadReference' (0x29d0) has exited with code 0 (0x0).
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded '<Path Stripped>\MyProjectName.exe', Symbols loaded.
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'Microsoft.Practices.ServiceLocation'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'GalaSoft.MvvmLight.Extras'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXmlLinq\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXmlLinq.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'GalaSoft.MvvmLight'
    A first chance exception of type 'System.IO.FileNotFoundException' occurred in System.dll
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'System.Windows.Interactivity'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'Newtonsoft.Json'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Dynamic\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Dynamic.dll'
    A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'Anonymously Hosted DynamicMethods Assembly'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXml\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXml.dll'
    A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll
    A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll
    A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll
    A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'Xceed.Wpf.Toolkit'
    A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll
    A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll
    A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'
    A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll
    A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll
    A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll
    A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll
    A first chance exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in Microsoft.CSharp.dll
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationTypes.dll'
    'MyProjectName.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\UIAutomationProvider\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationProvider.dll'
    A first chance exception of type 'System.Net.WebException' occurred in System.dll
    The thread 'vshost.RunParkingWindow' (0x31a4) has exited with code 0 (0x0).
    The thread '<No Name>' (0x2884) has exited with code 0 (0x0).
    The thread '<No Name>' (0x3590) has exited with code 0 (0x0).
    The program '[12724] MyProjectName.vshost.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).
    The program '[12724] MyProjectName.vshost.exe: Program Trace' has exited with code 0 (0x0).
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0\u 4.0.0.0\uu b77a5c561934e089\mscorlib.dll'
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0_b77a5c561934e089\System.Windows.Forms.dll'
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0.0.0_uuB03F5F7F11D50A3A\System.Drawing.dll'
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'
“MyProjectName.vshost.exe”(托管(v4.0.30319)):加载的“C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\12.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll”
“MyProjectName.vshost.exe”(托管(v4.0.30319)):已加载“\MyProjectName.vshost.exe”
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0_b77a5c561934e089\System.Xml.dll'
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0_uuB03F5F7F11D50A3A\Microsoft.CSharp.dll'
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0_uuB77A5C561934E089\System.Core.dll'
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0_b77a5c561934e089\System.Xaml.dll'
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0_b77a5c561934e089\System.Xml.Linq.dll'
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll'
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC\U 64\PresentationCore\v4.0\U 4.0.0.0\UUU 31bf3856ad364e35\PresentationCore.dll'
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC\U MSIL\PresentationFramework\v4.0\U 4.0.0.0\UUU 31bf3856ad364e35\PresentationFramework.dll'
Microsoft.VisualStudio.HostingProcess.Utilities.dll中首次出现类型为“System.Runtime.InteropServices.COMException”的异常
线程“vshost.NotifyLoad”(0x15c8)已退出,代码为0(0x0)。
线程“vshost.LoadReference”(0x29d0)已退出,代码为0(0x0)。
“MyProjectName.vshost.exe”(托管(v4.0.30319)):已加载“\MyProjectName.exe”,已加载符号。
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC\U MSIL\System.Configuration\v4.0\U 4.0.0.0\UUUU b03f5f7f11d50a3a\System.Configuration.dll'
“MyProjectName.vshost.exe”(托管(v4.0.30319)):加载了“Microsoft.Practices.ServiceLocation”
“MyProjectName.vshost.exe”(托管(v4.0.30319)):加载了“GalaSoft.MvvmLight.Extras”
'MyProjectName.vshost.exe'(托管(v4.0.30319)):加载'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework SystemXmlLinq\v4.0_4.0.0.0_b77a5c561934e089\PresentationFramework SystemXmlLinq.dll'
“MyProjectName.vshost.exe”(托管(v4.0.30319)):加载了“GalaSoft.MvvmLight”
System.dll中出现“System.IO.FileNotFoundException”类型的第一次意外异常
“MyProjectName.vshost.exe”(托管(v4.0.30319)):加载了“System.Windows.Interactivity”
“MyProjectName.vshost.exe”(托管(v4.0.30319)):加载了“Newtonsoft.Json”
“MyProjectName.vshost.exe”(托管(v4.0.30319)):Lo