编译ASP.NET到64位 [英] Compile ASP.NET to 64 BIT

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

问题描述

我的机器是Win XP的专业版32位和生产机器为Windows Server 2008(64位)和IIS 7.在我的机器我想要编译ASP.NET(使用ASPNET编译器)到64位字节$ C $角

My development machine is Win XP Pro 32 bit and production machine is Windows Server 2008 (64 Bit) with IIS 7. On my development machine I want to compile ASP.NET (Using aspnet compiler) to 64 bit byte code.

谁能告诉我该怎么做?请不要提出任何的方式来运行在64位环境中32位应用程序。

Can anyone please tell me how to do that? Please do not suggest any way to run 32 bit application on 64 bit environment.

我想64位应用程序的32位机器上编译,以便在运行时将采取的64位O / S充分利用,没有任何模拟。

I want 64 bit application to be compiled on 32 bit machine so that when it runs it will take full advantage of 64 bit O/S without any emulation.

推荐答案

将目标平台在值为anycpu和.NET会当一个64位操作系统上自动执行原生64位上运行

Leave the target platform at AnyCpu and .NET will automatically run natively on 64bit when executed on a 64Bit operating system

澄清:

(这开始了作为一个评论,但我认为它可能对这个问题很有趣也一样)

(this started out as a comment but I thought it might be interesting for the question as well)

其实你从来没有编到一个特殊的建筑。你总是编译为IL。

Actually you never compile to a special architecture. You always compile to IL.

这有点像Java字节code。和该字节code是32位​​和64位是相同的。

That's something like Java Bytecode. And that bytecode is the same for 32 bit and 64 bit.

在code被运行的机器上的虚拟机(.NET框架),然后编译IL实际机器code运行时(通过即时编译)。所以,无论你在哪里编译,你总是结束在IL这是位无知。

The Virtual Machine (.NET Framework) on the machine the code gets executed then compiles the IL to actual machine code while running (through the Just In Time compilation). So, no matter where you compile, you'll always end up in IL that's bit-ignorant.

在.NET中的设置仅在IL,告诉JIT(即时编译器),以专门使用32位/ 64位的指令。通过翻转,一个位在汇编,你可以仍然处于值为anycpu或x64执行它无需重新编译。

The setting in .NET is only an instruction in IL that tells the JIT (Just in Time compiler) to specifically use 32bit/64 bit. By flipping that one bit in your assembly you could still execute it in AnyCpu or x64 without recompilation.

此设置仅用于在需要的情况下,你喊原生code,是不是有点昧(与COM组件进行交互或做p如果在/ Invoke调用)

This setting is only used and needed in case you call out to native code that isn't bit-ignorant (when interacting with COM components or doing p/invoke calls)

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

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