When creating a CLR function for SQL Server do I need to compile two separate versions, one for 32 bit and one for 64 bit SQL server instances?
asked Mar 09 '10 at 08:15 AM in Default
What Matt said is true if you do not make a call to some assembly targeted to a specific platform or an unmanaged code for specific platform.
If you compile CLR assembly targetting it to AnyCpu and run this on x64 system, then it will be executed as x64 assebly. Although if you make a call to other unmanaged code or CLR assembly that is targeted to x86, then you will receive an exception of bad image format.
So if you need to call assemblies for different platforms, then you have to make two separate builds.
If you will have clear .NET code in the assembly and all will be targeted for AnyCpu, then you need only one build targeted for AnyCpu.
answered Mar 09 '10 at 11:34 AM