Delphi 2005 and 64-bit .NET
Turns out Delphi 2005 already supports 64-bit .NET. Danny Thorpe posted this to the Borland newsgroups:
For Microsoft C# 1.x, I think this is correct. The new PE header flags defined in .NET 2.0 to specify "bitness" (32 bit only, 64 bit only, or agnostic) are not supported by the MS C# 1.x compiler, for the simple reason that the .NET 2.0 bits were defined after the C# compiler was built and distributed. The beta C# 2.0 compiler for 32 bit .NET now includes support for the bitness flags and 64 bit execution.For Delphi, this is not correct. Delphi 2005 shipped after the .NET 2.0 bitness flags were added. We added several things to the Delphi 2005 compiler to support linking against the beta .NET 2.0 assemblies, including emitting the bitness flags (we default to agnostic) and the special extensions required for .NET 64 to consider a Delphi.NET app a candidate for running in 64 bit mode.
Another point that created a lot of confusion in conversations with Microsoft’s Josh Williams is managed vs unmanaged code. My understanding is that if a 32 bit .NET exe contains any unmanaged code, .NET 64 will not run it in 64 bit mode. Josh was really dumbfounded that 32 bit Delphi.NET apps were "floating up" to 64 bit execution until I convinced him that Delphi.NET produces 100% managed code apps, *and* the bitness flags, and the required 64 bit PE headers. (I think Josh is from the C++ side of the Microsoft house, where nothing is 100% managed)
Update: Hallvard Vassbotn notes in comments that Danny has an additional post indicating that some minor tweaks will be necessary to VCL for .NET for it to be 64-bit .NET compliant. So for the time being if you need to use this feature you’ll need to write WinForms or GUI-less apps.