运行.NET 4桌面应用程序失败

运行.NET 4桌面应用程序失败,.net,dependencies,.net,Dependencies,我已经创建了一个.NET4桌面应用程序,它可以在各种基于Windows-7的PC上很好地运行,无论是否安装了VisualStudio。目标PC需要有.NET framework 4客户端配置文件和扩展配置文件 但是,当我尝试在安装了.NET 4的Vista PC上运行相同的应用程序时(这是我使用Vista的唯一一台PC,我没有检查其他PC,因此Vista可能不是罪魁祸首),我遇到了这个异常,我无法理解: Exception object: 01dc1bb4 Exception type: S

我已经创建了一个.NET4桌面应用程序,它可以在各种基于Windows-7的PC上很好地运行,无论是否安装了VisualStudio。目标PC需要有.NET framework 4客户端配置文件和扩展配置文件

但是,当我尝试在安装了.NET 4的Vista PC上运行相同的应用程序时(这是我使用Vista的唯一一台PC,我没有检查其他PC,因此Vista可能不是罪魁祸首),我遇到了这个异常,我无法理解:

Exception object: 01dc1bb4
Exception type:   System.BadImageFormatException
Message:          Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The module was expected to contain an assembly manifest.
InnerException:   System.BadImageFormatException, Use !PrintException 01dc25d8 to see more.
StackTrace (generated):
SP       IP       Function
0029E264 6F98249A mscorlib_ni!System.ModuleHandle.ResolveMethodHandleInternalCore(System.Reflection.RuntimeModule, Int32, IntPtr[], Int32, IntPtr[], Int32)+0x8a
0029E29C 6F97B4E2 mscorlib_ni!System.ModuleHandle.ResolveMethodHandleInternal(System.Reflection.RuntimeModule, Int32, System.RuntimeTypeHandle[], System.RuntimeTypeHandle[])+0x42
0029E2C4 6F97AFFF mscorlib_ni!System.Reflection.CustomAttributeData..ctor(System.Reflection.RuntimeModule, System.Reflection.CustomAttributeRecord)+0x37
0029E448 6F97AF97 mscorlib_ni!System.Reflection.CustomAttributeData.GetCustomAttributes(System.Reflection.RuntimeModule, Int32)+0x53
0029E464 6F97C887 mscorlib_ni!System.Reflection.CustomAttributeData.GetCustomAttributesInternal(System.Reflection.RuntimeAssembly)+0x47
0029E480 6F97C825 mscorlib_ni!System.Reflection.RuntimeAssembly.GetCustomAttributesData()+0x5
0029E484 6F97C815 mscorlib_ni!System.Reflection.CustomAttributeData.GetCustomAttributes(System.Reflection.Assembly)+0x21
0029E490 6F97C5C9 mscorlib_ni!System.Resources.ManifestBasedResourceGroveler.GetNeutralResourcesLanguage(System.Reflection.Assembly, System.Resources.UltimateResourceFallbackLocation ByRef)+0x31
0029E4DC 6F97C515 mscorlib_ni!System.Resources.ResourceManager.CommonSatelliteAssemblyInit()+0x6d
0029E4F8 6F97C439 mscorlib_ni!System.Resources.ResourceManager..ctor(System.String, System.Reflection.Assembly)+0x51
0029E510 009CF7DB Microsoft_Practices_Composite_ba0000!Microsoft.Practices.Composite.Properties.Resources.get_ResourceManager()+0x9b
0029E53C 009CF700 Microsoft_Practices_Composite_ba0000!Microsoft.Practices.Composite.Properties.Resources.get_DefaultTextLoggerPattern()+0x20
0029E550 009CF585 Microsoft_Practices_Composite_ba0000!Microsoft.Practices.Composite.Logging.TextLogger.Log(System.String, Microsoft.Practices.Composite.Logging.Category, Microsoft.Practices.Composite.Logging.Priority)+0x35
0029E5CC 009CF359 Microsoft_Practices_Composite_UnityExtensions_b70000!Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.Run(Boolean)+0x99
0029E624 009CF2A4 Microsoft_Practices_Composite_UnityExtensions_b70000!Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.Run()+0x24
0029E630 009CF054 iToldem!ClientBootstrapper.App.OnStartup(System.Windows.StartupEventArgs)+0x54
0029E648 009CEF43 PresentationFramework_4310000!System.Windows.Application.<.ctor>b__1(System.Object)+0x33
0029E658 009CC04D WindowsBase_4a00000!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)+0xfd
0029E67C 009CBED0 WindowsBase_4a00000!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)+0x40
0029E6C4 009CBAC6 WindowsBase_4a00000!System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate, System.Object, Int32, System.Delegate)+0x36
0029E6E4 009CEE4D WindowsBase_4a00000!System.Windows.Threading.DispatcherOperation.InvokeImpl()+0x5d
0029E714 009CEDD9 WindowsBase_4a00000!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)+0x29
0029E71C 6F974DB5 mscorlib_ni!System.Threading.ExecutionContext.runTryCode(System.Object)+0x51
0029EBC0 6F974CBA mscorlib_ni!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)+0x6a
0029EBD8 6F977FC2 mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)+0x7e
0029EBFC 6F977F34 mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)+0x2c
0029EC18 009CED00 WindowsBase_4a00000!System.Windows.Threading.DispatcherOperation.Invoke()+0x50
0029EC54 009CE8B7 WindowsBase_4a00000!System.Windows.Threading.Dispatcher.ProcessQueue()+0x1a7
0029EC94 009CE5D4 WindowsBase_4a00000!System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)+0x64
0029ECE8 009CC253 WindowsBase_4a00000!MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)+0xb3
0029ED34 009CC17F WindowsBase_4a00000!MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)+0x6f
0029ED44 009CC04D WindowsBase_4a00000!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)+0xfd
0029ED68 009CBED0 WindowsBase_4a00000!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)+0x40
0029EDB0 009CBAC6 WindowsBase_4a00000!System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate, System.Object, Int32, System.Delegate)+0x36
0029EDD0 009CB82B WindowsBase_4a00000!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)+0x8b
0029EE18 009CB29F WindowsBase_4a00000!MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)+0x19f
0029EFE4 009CDFBB WindowsBase_4a00000!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)+0xab
0029F034 009CDE2E WindowsBase_4a00000!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)+0x2e
0029F040 009CDD5A PresentationFramework_4310000!System.Windows.Application.RunDispatcher(System.Object)+0x2a
0029F04C 009CD987 PresentationFramework_4310000!System.Windows.Application.RunInternal(System.Windows.Window)+0x167
0029F060 009CD67A PresentationFramework_4310000!System.Windows.Application.Run(System.Windows.Window)+0x2a
0029F070 009CD62F PresentationFramework_4310000!System.Windows.Application.Run()+0x5f
0029F07C 009C00B1 MyApplication!ClientBootstrapper.App.Main()+0x41

StackTraceString: <none>
HResult: 80131018
异常对象:01dc1bb4 异常类型:System.BadImageFormatException 消息:无法加载文件或程序集'System.Core,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089'或其依赖项之一。模块应包含程序集清单。 InnerException:System.BadImageFormatException,使用!PrintException 01dc25d8以查看更多信息。 StackTrace(已生成): SP IP功能 0029E264 6F98249A mscorlib_ni!System.ModuleHandle.ResolveMethodHandleInternalCore(System.Reflection.RuntimeModule,Int32,IntPtr[],Int32,IntPtr[],Int32)+0x8a 0029E29C 6F97B4E2 mscorlib_ni!System.ModuleHandle.ResolveMethodHandleInternal(System.Reflection.RuntimeModule,Int32,System.RuntimeTypeHandle[],System.RuntimeTypeHandle[])+0x42 0029E2C4 6F97AFFF mscorlib_ni!System.Reflection.CustomAttributeData..ctor(System.Reflection.RuntimeModule,System.Reflection.CustomAttributeRecord)+0x37 0029E448 6F97AF97 mscorlib_ni!System.Reflection.CustomAttributeData.GetCustomAttributes(System.Reflection.RuntimeModule,Int32)+0x53 0029E464 6F97C887 mscorlib_ni!System.Reflection.CustomAttributeData.GetCustomAttributesInternal(System.Reflection.RuntimeAssembly)+0x47 0029E480 6F97C825 mscorlibúni!System.Reflection.RuntimeAssembly.GetCustomAttributesData()+0x5 0029E484 6F97C815 mscorlib_ni!System.Reflection.CustomAttributeData.GetCustomAttributes(System.Reflection.Assembly)+0x21 0029E490 6F97C5C9 mscorlib_ni!System.Resources.ManifestBasedResourceGroveler.GetNeutralResourcesLanguage(System.Reflection.Assembly,System.Resources.UltimateResourceAllBackLocation ByRef)+0x31 0029E4DC 6F97C515 mscorlib_ni!System.Resources.ResourceManager.CommonSatelliteSassemblyInit()+0x6d 0029E4F8 6F97C439 mscorlib_ni!System.Resources.ResourceManager..ctor(System.String,System.Reflection.Assembly)+0x51 0029E510009CF7DB微软公司实践复合材料万元!Microsoft.Practices.Composite.Properties.Resources.get_ResourceManager()+0x9b 0029E53C 009CF700 Microsoft_Practices_Composite_ba0000!Microsoft.Practices.Composite.Properties.Resources.get_DefaultTextLoggerPattern()+0x20 0029E550 009CF585微软实践与复合!Microsoft.Practices.Composite.Logging.TextLogger.Log(System.String,Microsoft.Practices.Composite.Logging.Category,Microsoft.Practices.Composite.Logging.Priority)+0x35 0029E5CC 009CF359 Microsoft_Practices_Composite_UnityExtensions_b70000!Microsoft.Practices.Composite.UnityExtensions.UnityBootTrapper.Run(布尔)+0x99 0029E624 009CF2A4 Microsoft_Practices_Composite_UnityExtensions_b70000!Microsoft.Practices.Composite.UnityExtensions.UnityBootTrapper.Run()+0x24 0029E630 009CF054 iToldem!ClientBootstrapper.App.OnStartup(System.Windows.StartupEventArgs)+0x54 0029E648 009CEF43呈现框架_4310000!System.Windows.Application.b__1(System.Object)+0x33 0029E658 009CC04D WindowsBase_4a00000!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate,System.Object,Int32)+0xfd 0029E67C 009CBED0 WindowsBase_4a00000!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object,System.Delegate,System.Object,Int32,System.Delegate)+0x40 0029E6C4 009CBAC6 WindowsBase_4a00000!System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate,System.Object,Int32,System.Delegate)+0x36 0029E6E4 009CEE4D WindowsBase_4a00000!System.Windows.Threading.DispatcherOperation.InvokeImpl()+0x5d 0029E714 009CEDD9 WindowsBase_4a00000!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)+0x29 0029E71C 6F974DB5 mscorlib_ni!System.Threading.ExecutionContext.runTryCode(System.Object)+0x51 0029EBC0 6F974CBA mscorlib_ni!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext,System.Threading.ContextCallback,System.Object)+0x6a 0029EBD8 6F977FC2 mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,System.Threading.ContextCallback,System.Object,Boolean)+0x7e 0029EBFC 6F977F34 mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,System.Threading.ContextCallback,System.Object)+0x2c 0029EC18 009CED00 WindowsBase_4a00000!System.Windows.Threading.DispatcherOperation.Invoke()+0x50 0029EC54 009CE8B7 WindowsBase_4a00000!System.Windows.Threading.Dispatcher.ProcessQueue()+0x1a7 0029EC94 009CE5D4 WindowsBase_4a00000!System.Windows.Threading.Dispatcher.WndProcHook(IntPtr,Int32,IntPtr,IntPtr,Boolean ByRef)+0x64 0029ECE8 009CC253 WindowsBase_4a00000!WndProc(IntPtr,Int32,IntPtr,IntPtr,Boolean ByRef)+0xb3 0029ED34 009CC17F WindowsBase_4a00000!MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)+0x6f 0029ED44 009CC04D WindowsBase_4a00000!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate,System.Object,Int32)+0xfd 0029ED68 009CBED0 WindowsBase_4a00000!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object,System.Delegate,System.Object,Int32,System.Delegate)+0x40 0029EDB0009CBAC6 WindowsBase_4a00000!System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate,System.Object,Int32,System.Delegate)+0x36 0029EDD0 009CB82B WindowsBase_4a00000!System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority,System.TimeSpan,System.Delegate,System.Object,Int32)+0x8b 0029EE18 009CB29F WindowsBase_4a00000!MS.Win32.HwndSubclass.SubclassWndProc(IntPtr,Int32,IntPtr,IntPtr)+0x19f 0029EFE4 009CDFBB WindowsBase_4a00000!System.Windows.Threading.Dispatch