微软破坏了.NET兼容性?

发布于 2024-09-07 15:03:28 字数 346 浏览 7 评论 0原文

几天前,我的 .NET 3.5 应用程序开始失败,同时开始发出错误

“无法找到运行此应用程序的运行时版本”。

因为我没有对它们做任何事情,所以这对我来说看起来很奇怪。经过一番调查,我发现原因是 Windows 自动更新在我的计算机上安装了 .NET 3.5 或 .NET 4 的服务包(我不知道两者中哪一个有问题)。该更新无法卸载,因为它未显示在控制面板的已安装 Windows 更新列表中。我必须恢复到系统还原点!

今天我的一位客户抱怨了同样的问题。我不能强迫他恢复系统还原,所以我需要知道如何克服微软这个愚蠢的事情。有人可以分享你对此的想法吗?

PS 该软件受 CodeVeil 1.2 保护,也许这很重要。

A few days ago my .NET 3.5 applications began to fail while start issuing the error

"Unable to find a version of the runtime to run this application".

As I did not do anything with them, this looked weird to me. After some investigation, I discovered, that the reason is Windows automatic update which installed service pack for .NET 3.5 or .NET 4 to my computer (I did not figure which of two is guilty). That update was not be possible to uninstall as it was not shown in Installed Windows updates list at Control Panel. I had to revert to system restore point!

Today one of my customers complained to the same problem. I cannot force him to revert to system restore so I need to know how to overcome this silly Microsoft thing. Can anyone please share your ideas on that?

P.S. The software is protected with CodeVeil 1.2, maybe this matters.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一个人的旅程 2024-09-14 15:03:28

在我们提出解决方案之前,我们需要了解这里发生了什么。解决此问题的第一步是获取更多信息

  • 您的应用程序是针对哪个版本的 CLR 进行编译的?
  • 计算机上安装了哪些版本的 CLR?
  • 机器是什么操作系统?

通常,当应用程序是针对计算机上未安装的 CLR 版本编译的时,会出现此错误消息。例如,有一个 2.0 应用程序,但只有一个 4.0 CLR。

Before we can suggest a fix to this we need to understand what is happening here. The first step to solving this is to get a bit more information

  • What version of the CLR is your application compiled against?
  • What versions of the CLR are installed on the machine?
  • What operating system is the machine?

Typically this error message occurs when the application is compiled for a version of the CLR which is not installed on the machine. For example having a 2.0 application but only a 4.0 CLR.

当爱已成负担 2024-09-14 15:03:28

谢谢大家的帮助!

我终于发现这是旧的 CodeVeil,它破坏了应用程序。安装.NET 4.0更新后,所有受CodeVeil 1.2保护的应用程序都被完全破坏。我购买了该产品的最新版本,现在可以使用了。

Thanks everybody for help!

I finally figured out that this is old CodeVeil which was guilty in the ruining the application. After .NET 4.0 update was installed, all applications protected by CodeVeil 1.2 were completely broken. I purchased newest version of the product and it now works.

不甘平庸 2024-09-14 15:03:28

就我而言,问题很容易解决,在 app.config 文件中添加以前的运行时版本,如下所述
https://msdn.microsoft.com/en -us/library/jj152935(v=vs.110).aspx

<?xml version="1.0"?>
<configuration>
    <startup>
        <supportedRuntime version="<YOUR_VERSION>"/>
    </startup>
</configuration>

在你的情况下,上面的文档后面应该是“v2.0.50727”,因为这个字符串也映射到.NET 3.5。

那里有可能版本的列表
https://msdn.microsoft.com/en -us/library/jj152935(v=vs.110).aspx

In my case, the issue was easy resolved add the previous runtime version in app.config file, as explained here
https://msdn.microsoft.com/en-us/library/jj152935(v=vs.110).aspx

<?xml version="1.0"?>
<configuration>
    <startup>
        <supportedRuntime version="<YOUR_VERSION>"/>
    </startup>
</configuration>

In your case, following the above doc should be "v2.0.50727", because this string is mapped to be .NET 3.5 too.

A list of possible version is there
https://msdn.microsoft.com/en-us/library/jj152935(v=vs.110).aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文