How to download a specific version of an assembly

To complete some testing, I need to download the 64-bit version of the assembly, although I am running the 32-bit version of Windows. Is it possible?

+4
source share
4 answers

I'm not sure why you would like to do this, but I suppose you could. If you do nothing to say otherwise, the CLR will download the version of the assembly specific to the processor used. This is usually what you want. But I had a case where I needed to download a neutral version of the AI ​​assembly. I used the Download method to specify the version. I have not tried (and others here suggest that this does not work for an executable assembly), but I suppose you can do the same to indicate that you want to download the 64-bit version. (You need to specify whether you want a version of AMD64 or IA64.)

+4
source

From CLR Via C # (Jeff Richter):

"If your build files contain only managed code, you write code that should work on both 32-bit and 64-bit versions of Windows. No source code changes are needed to run your code on any version of Windows.

In fact, the resulting EXE / DLL file created by the compiler will be run on 32-bit Windows, as well as 64-bit versions of x64 and IA64! In other words, a single file will run on anyone that has a version of the .NET Framework installed on it. "

"The C # compiler offers a command line / platform switch. This switch allows you to specify whether the resulting assembly can run on x86 machines with 32-bit versions of Windows only 64-bit computers with 64-bit versions of Windows or Intel Itanium computers running 64- bit Windows only: If you did not specify a platform, anycpu is used by default, which indicates that the resulting assembly can work on any version of Windows.

+1
source

Windows 32-bit cannot run 64-bit executables without VM / emutalor

32-bit Windows can compile to run on 64-bit Windows

-1
source

No, you cannot run assemblies that are compiled for 64-bit on a system with a 32-bit version of Windows.

-1
source

Source: https://habr.com/ru/post/1276970/


All Articles