WPF .net 4 应用程序无法在 Windows 7 上正常运行

WPF .net 4 application does not work properly on Windows 7

我在 Visual Studio 2012 Express for Desktop on Windows 8 上创建了一个 WPF 应用程序,C# 目标框架 = .Net Framework 4。 当我 运行 Windows 7 中的程序时,它 运行s 但工作不正确。例如:当您单击按钮时,不会调用单击事件。在 Windows 7 上安装了 .Net Framework 4。 也不会发生任何错误。根本不起作用任何按钮。如果你 运行 变成 Windows 8,那么一切正常。

用 FUSLOGVW.exe 测试。

    The operation failed.
Bind result: hr = 0x80131047. No description available.

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable  C:\Release\Myapp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = My-pc\Mypc
LOG: DisplayName = System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes
(Fully-specified)
LOG: Appbase = file:///C:/Release/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = Myapp.exe
Calling assembly : Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Release\Myapp.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: PublicKeyToken redirect found in portability config: 7cec85d7bea7798e redirected to b77a5c561934e089.
LOG: Version redirect found in portability config: 2.0.5.0 redirected to 4.0.0.0.
ERR: Failed to apply policy (hr = 0x80131047).
ERR: Unrecoverable error occurred during pre-download check (hr = 0x80131047).

问题解决,安装补丁后 http://support.microsoft.com/kb/2468871