下层.NET问题 [英] Downlevel .NET question

查看:65
本文介绍了下层.NET问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果在仅具有

..NET 2.0的计算机上执行.NET 3.5 .exe文件会发生什么?用户是否收到有意义的错误消息?

What happens if a .NET 3.5 .exe file is executed on a computer that only has
..NET 2.0? Does the user get a meaningful error message?

推荐答案

7月25日,7:15 * am,MC < for.address.l ... @ www.ai.uga.edu.slash.mc>

写道:
On Jul 25, 7:15*am, "MC" <for.address.l...@www.ai.uga.edu.slash.mc>
wrote:

什么如果在仅具有

.NET 2.0的计算机上执行.NET 3.5 .exe文件会发生什么? *用户是否收到有意义的错误消息?
What happens if a .NET 3.5 .exe file is executed on a computer that only has
.NET 2.0? *Does the user get a meaningful error message?



令我惊讶的是,使用3.5使用快速版创建的一个.exe在具有框架2.0的机器上成功运行了

。我原本期待

错误....


-Cnu

To my surprise, one .exe created with express edition using 3.5, ran
successfully on a machine having framework 2.0. I was expecting an
error....

-Cnu


7月25日, 6:15 * am,MC < for.address.l ... @ www.ai.uga.edu.slash.mc>

写道:
On Jul 25, 6:15*am, "MC" <for.address.l...@www.ai.uga.edu.slash.mc>
wrote:

什么如果在仅具有

.NET 2.0的计算机上执行.NET 3.5 .exe文件会发生什么? *用户是否收到有意义的错误消息?
What happens if a .NET 3.5 .exe file is executed on a computer that only has
.NET 2.0? *Does the user get a meaningful error message?



没有.NET 3.5 .exe文件这样的东西。 - 你的任何程序集
构建目标.NET 3.5与.NET 2.0二进制兼容(因为

都使用相同的2.0运行时)。唯一的区别可能是.NET

3.5程序集可以引用3.5中的一些新程序集。在

这种情况​​下,如果你真的尝试使用那些

引用的程序集中的任何东西,你将得到与
$完全相同的错误b $ b缺少图书馆。如果你不使用任何3.5程序集,它只会运行



注意你可以注册自己的处理程序

AppDomain.AssemblyResolve事件以检测缺少的程序集,如果程序集是3.5,则
提供您自己的错误消息。

There is no such thing as a ".NET 3.5 .exe file" - any assembly you
build targeting .NET 3.5 is binary compatible with .NET 2.0 (because
both use the same 2.0 runtime). The only difference may be that .NET
3.5 assembly can reference some of the new assemblies from 3.5. In
this case, and if you actually try to use anything from those
referenced assemblies, you''ll get the exact same error as for a
missing library. If you do not use any 3.5 assemblies, it will just
run.

Note that you can register your own handler for
AppDomain.AssemblyResolve event to detect missing assemblies and
provide your own error message if the assembly is a 3.5 one.


" Pavel Minaev" ; < in **** @ gmail.comwrote in message

news:a3 ************************** ******** @ r35g2000 prm.googlegroups.com ...

写道:

--------------
"Pavel Minaev" <in****@gmail.comwrote in message
news:a3**********************************@r35g2000 prm.googlegroups.com...
wrote:
--------------

如果在只有
的计算机上执行.NET 3.5 .exe文件会发生什么情况

.NET 2.0?用户是否收到有意义的错误消息?
What happens if a .NET 3.5 .exe file is executed on a computer that only
has
.NET 2.0? Does the user get a meaningful error message?



没有.NET 3.5 .exe文件这样的东西。 - 你的任何程序集
构建目标.NET 3.5与.NET 2.0二进制兼容(因为

都使用相同的2.0运行时)。唯一的区别可能是.NET

3.5程序集可以引用3.5中的一些新程序集。在

这种情况​​下,如果你真的尝试使用那些

引用的程序集中的任何东西,你将得到与
$完全相同的错误b $ b缺少图书馆。如果你不使用任何3.5组件,它只会运行


-------------

谢谢。什么是新组件?

There is no such thing as a ".NET 3.5 .exe file" - any assembly you
build targeting .NET 3.5 is binary compatible with .NET 2.0 (because
both use the same 2.0 runtime). The only difference may be that .NET
3.5 assembly can reference some of the new assemblies from 3.5. In
this case, and if you actually try to use anything from those
referenced assemblies, you''ll get the exact same error as for a
missing library. If you do not use any 3.5 assemblies, it will just
run.
-------------

Thanks. What are the new assemblies?


这篇关于下层.NET问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆