开发者

VS build - 32 bit vs 64

开发者 https://www.devze.com 2023-01-03 15:58 出处:网络
ASP.NET 4.0: My laptop is running 64-bit Win7 Ultimate, using VS 2010 and IIS7. My dev, staging and production servers are all 32-bit 2003 Server with IIS6 (obviously).

ASP.NET 4.0:

My laptop is running 64-bit Win7 Ultimate, using VS 2010 and IIS7.

My dev, staging and production servers are all 32-bit 2003 Server with IIS6 (obviously).

Questions:

  1. I know this is really unsupported, but is 开发者_如何学Gothere any way I can get IIS6 to run on my laptop under Win7? It'd be nice to keep the configuration consistent between my local environment and the deployment pipeline, but I refuse to go back to XP.

  2. If I compile under VS2010 on Win7 with the "Any CPU" flag set in the target configuration, are the generated assemblies target-independent? That is, are they 64- or 32-bit specific, or will they really work on either one? (My usual method of "try it and see" is not working at the moment for a variety of unrelated reasons).

  3. On my laptop, I have both Framework and Framework64 folders. If the assemblies are target-agnostic, what's the difference between them and the assemblies that VS generates from my code? If they're not target-agnostic, why do I have two separate folders? Is there a performance difference between these two versions?

Thanks in advance.


  1. There's no way, that I know, to run a different version of IIS than what's based on the OS. Since IIS is tied in to the installation of whatever OS you have (6.0 in XP and Server 2003, 7.0 in Vista and Server 2008, and 7.5 in Win7 and Server 2008 R2), you can't install a different version - you'll need an XP or 2003 location to test if you want to use IIS6.

  2. They're target-independent. VS doesn't actually compile machine code - it compiles to IL (an "intermediate language") that the .NET framework on the destination machine (either x64 or x86, depending on what version of the OS is installed) compiles into machine code that works natively. As such, compiling for "AnyCPU" will allow you to run on either. If you prefer, you can target x86 when you compile, and they'll run natively on your x86 servers and using WoW on your x64 machine, so you'll actually be running the exact same code on both.

  3. That just means you have both versions of the framework installed - x64 and x86. The assemblies are target-agnostic, but the relevant version of the framework converts the .NET IL assemblies into machine code that executes natively on the PC. To do that, there needs to be an x86 framework to compile to x86 machine code (if you have an x86 processor), and the same for x64.

0

精彩评论

暂无评论...
验证码 换一张
取 消