简体   繁体   English

为什么.net 3.5 WPF应用程序未在某些Win 10操作系统中运行

[英]Why .net 3.5 WPF Application not running in some Win 10 OS

I created some simple .NET 3.5 WPF application using visual studio 2008 (Win 7 OS). 我使用Visual Studio 2008 (Win 7 OS)创建了一些简单的.NET 3.5 WPF应用程序 My PC win 10 verion is 1709 (OS Build 16299.251). 我的PC Win 10版本是1709(操作系统内部版本16299.251)。 But that application can't running on some win 10 OS . 但是该应用程序无法在某些Win 10 OS上运行 (It's working perfeclty on win 7 and some of win 10 pc/laptop). (这在win 7和部分win 10 pc /笔记本电脑上是完美的)。 By the way .NET 3.5 C# application working all above pc/laptop. 顺便说一下,.NET 3.5 C#应用程序可以在PC /笔记本电脑上正常工作。 I re-installed .NET 3.5 but it's not working. 我重新安装了.NET 3.5,但无法正常工作。 And update all drivers those pc/laptop. 并更新所有驱动程序的那些PC /笔记本电脑。

EDIT 编辑

The type initializer for 'System.Windows.Media.FontFamily' threw an exception. “ System.Windows.Media.FontFamily”的类型初始值设定项引发了异常。 when I tried to build that application in Win 10 PC(error came on that pc). 当我尝试在Win 10 PC中构建该应用程序时(该PC上出现错误)。 But this application perfectly builds in Win 7 and some Win 10 PC. 但是,此应用程序可以完美地构建在Win 7和某些Win 10 PC中。

So 'can't run' is quite wide spread. 因此,“跑不了”的现象非常普遍。

As you mentioned that .Net Framework 3.5 is already installed and you tried reinstalling it (hopefully by control panel - as mentioned by Kudryavtsev), it may be that the application is crashing directly in front. 正如您提到的那样,已经安装了.Net Framework 3.5,并尝试重新安装它(希望通过控制面板-如Kudryavtsev所述),这可能是因为应用程序直接崩溃在前面。

Please open the event viewer (control panel -> administrative tools -> event viewer) and check in the Application area for '.Net Runtime Errors'. 请打开事件查看器(控制面板->管理工具->事件查看器),然后在“应用程序”区域中检查“ .Net运行时错误”。

EDIT 编辑

The real error (see comment section): 真正的错误(请参阅评论部分):

The type initializer for 'System.Windows.Media.FontFamily' threw an exception. “ System.Windows.Media.FontFamily”的类型初始值设定项引发了异常。 when I tried to build that application in Win 10 PC(error came on that pc). 当我尝试在Win 10 PC中构建该应用程序时(该PC上出现错误)。 But this application perfectly builds in Win 7 and some Win 10 PC. 但是,此应用程序可以完美地构建在Win 7和某些Win 10 PC中。

The resolution was to remove some 'special fonts' from the application 解决方案是从应用程序中删除一些“特殊字体”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM