分享

c# – .NET框架的先决条件

 印度阿三17 2019-06-30

朋友你好,我需要在目标机器上安装已发布的应用程序时解释有关.NET框架的先决条件.

因为java是向下兼容的,所以我的意思是如果我已经安装了java v1.6并且如果应用程序是使用java v1.5开发的(我还意味着只使用1.5中可用的类和包来构建appln.)

我确信开发的应用程序肯定会通过安装最新或更高版本的jre或j2se来运行.

类似地,在.NET平台的情况下,如果我使用.NET framework 3.5开发我的应用程序,并且在目标机器中我安装了.NET framework 4.0(最新版本),那么它会提示安装.NET框架3.5为什么这样做呢?

实时示例是我已下载并尝试安装MySQL工作台并安装了.NET framework 4.0但它仍然要求在运行MySQL安装之前安装.NET framework 3.5.

我的问题是.NET框架是向下兼容的java还是.NET?

解决方法:

Version Compatibility in the .NET Framework

The .NET Framework 4 is
backward-compatible with applications
that were built with the .NET
Framework versions 1.1, 2.0, 3.0, and
3.5. In other words, applications and components built with previous
versions of the .NET Framework will
work on the .NET Framework 4.

However, in practice, this
compatibility can be broken by
seemingly inconsequential changes in
the .NET Framework and changes in
programming techniques. For example,
performance improvements in the .NET
Framework 4 can expose a race
condition that did not occur on
earlier versions. Similarly, using a
hard-coded path to .NET Framework
assemblies, performing an equality
comparison with a particular version
of the .NET Framework, and getting the
value of a private field by using
reflection are not backward-compatible
practices. In addition, each version
of the .NET Framework includes bug
fixes and security-related changes
that can affect the compatibility of
some applications and components.

If your application or component does
not work as expected on the .NET
Framework 4, use the following
checklists.

For .NET Framework 2.0, 3.0, and 3.5 applications:

Check .NET Framework 4 Migration
Issues for any changes that might
affect your application and apply the
workaround described.

If you are recompiling existing source
code to run on the .NET Framework 4,
or if you are developing a new version
of an application or component that
targets .NET Framework 4 from an
existing source code base, check
What’s Obsolete in the .NET Framework
for obsolete types and members, and
apply the workaround described.
(Previously compiled code will
continue to run against types and
members that have been marked as
obsolete.)

If you determine that a change in the
.NET Framework 4 has broken your
application, check the Runtime
Settings Schema to determine whether
you can use a runtime setting in your
application configuration file to
restore the previous behavior.

If you encounter an issue that is not
documented, file a Microsoft Connect
bug and contact netfxcf@microsoft.com
with the bug number.

来源:https://www./content-1-284351.html

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多