从64位应用程序中引用。net 1.1程序集。

时间:2022-09-01 10:22:38

I have to upgrade a project from 32 bit to 64 bit. My project is currently on .net 2.0 (will be soon 4.0, but doesn't really matter for this issue). My project is referencing some old .net 1.1 assemblies, that I only have in binary form. As you all know, 64 bit support was added in .net 2.0 only, and I expected my application won't run because of those old assemblies.

我必须将项目从32位升级到64位。我的项目目前在。net 2.0上(很快将会是4.0,但这并不重要)。我的项目引用了一些旧的。net 1.1程序集,我只有二进制形式。正如大家所知道的,64位支持仅在。net 2.0中添加,我希望我的应用程序不会因为那些旧的程序集而运行。

However, my application runs on a x64 server in 64 bit mode (no star is shown in Task Manager) while referencing the .net 1.1 dll.

然而,我的应用程序在x64位模式下运行(任务管理器中没有星型显示),同时引用。net 1.1 dll。

My questions are:

我的问题是:

  1. Why does it run? I previously read that you cannot use .net 1.1 assemblies in 64 bit apps.
  2. 为什么它运行?我之前读过,在64位应用程序中不能使用。net 1.1程序集。
  3. Are there any shortcomings if I keep the 1.1 assemblies? Or should I invest effort in getting newer versions of those 1.1 assemblies?
  4. 如果我保留1.1个程序集有什么缺点吗?或者我应该投资于获得1.1个程序集的新版本?

EDIT: I forgot to mention that a requirement is to run the application (asp.net) natively in 64 bit. The application runs in 64 bit because I disabled 32 bit compatibility on my application pool.

编辑:我忘了说,一个要求是以64位的方式运行应用程序(asp.net)。应用程序以64位运行,因为我在应用程序池中禁用了32位兼容性。

EDIT2: I just tried to compile and run the application compiled for x64. It works. So it runs in pure 64 bit mode, no questions about it.

我只是试着编译并运行为x64编译的应用程序。它的工作原理。它在纯64位模式下运行,没有问题。

2 个解决方案

#1


6  

A .NET 1.1 assembly contains the same kind of IL as a .NET 2 or .NET 4 assembly. Only the format of the metadata has changed. The jitter doesn't mind translating it to 64-bit machine code and the CLR can read the old metadata format. Only if the .NET 1.1 assembly contains native code will you have a problem. Corflags.exe utility, ILONLY bit. There's no compelling reason to rebuild that assembly.

. net 1.1程序集包含与. net 2或. net 4程序集相同的IL。只有元数据的格式发生了变化。jitter不介意将其翻译成64位机器代码,CLR可以读取旧的元数据格式。只有. net 1.1程序集包含本机代码时,才会出现问题。Corflags。exe实用,ILONLY一点。没有令人信服的理由重新构建这个程序集。

#2


0  

Is your application running under wow32 (32-bit emulation mode)? Most applications do not really run in x64 mode, they force the application to run in wow32 (x86 mode) to keep their backward compatibility on older x86 systems. Otherwise the application would run only on x64 systems but not on x86.

应用程序是否在wow32(32位模拟模式)下运行?大多数应用程序并不是在x64模式下运行,它们强制应用程序在wow32 (x86模式)中运行,以保持在旧的x86系统上的向后兼容性。否则,应用程序只能在x64系统上运行,而不能在x86上运行。

Forcing the application to run in x86 mode (even on x64 systems) allows to run ony any manchine no matter if its a 32 or 64 bit windows OS.

强制应用程序运行在x86模式(甚至在x64系统上)允许运行任何manchine,无论它是32位还是64位的windows操作系统。

#1


6  

A .NET 1.1 assembly contains the same kind of IL as a .NET 2 or .NET 4 assembly. Only the format of the metadata has changed. The jitter doesn't mind translating it to 64-bit machine code and the CLR can read the old metadata format. Only if the .NET 1.1 assembly contains native code will you have a problem. Corflags.exe utility, ILONLY bit. There's no compelling reason to rebuild that assembly.

. net 1.1程序集包含与. net 2或. net 4程序集相同的IL。只有元数据的格式发生了变化。jitter不介意将其翻译成64位机器代码,CLR可以读取旧的元数据格式。只有. net 1.1程序集包含本机代码时,才会出现问题。Corflags。exe实用,ILONLY一点。没有令人信服的理由重新构建这个程序集。

#2


0  

Is your application running under wow32 (32-bit emulation mode)? Most applications do not really run in x64 mode, they force the application to run in wow32 (x86 mode) to keep their backward compatibility on older x86 systems. Otherwise the application would run only on x64 systems but not on x86.

应用程序是否在wow32(32位模拟模式)下运行?大多数应用程序并不是在x64模式下运行,它们强制应用程序在wow32 (x86模式)中运行,以保持在旧的x86系统上的向后兼容性。否则,应用程序只能在x64系统上运行,而不能在x86上运行。

Forcing the application to run in x86 mode (even on x64 systems) allows to run ony any manchine no matter if its a 32 or 64 bit windows OS.

强制应用程序运行在x86模式(甚至在x64系统上)允许运行任何manchine,无论它是32位还是64位的windows操作系统。