我在Windows 8上使用目标框架= .Net Framework 4在Visual Studio 2012 Express for Desktop中创建了一个WPF应用程序C#。 当我在Windows 7中运行该程序时,它运行但工作不正确。例如:单击按钮时,不会调用单击事件。在Windows 7上安装.Net Framework 4。 也不会发生任何错误。根本不起任何按钮。如果您遇到Windows 8,那么一切正常。
答案 0 :(得分:0)
用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