Hi All,
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?
Hi All,
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?
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.
No, CLR code compiles to CIL / MSIL and the common language runtime handles it's targetting to the relevant processor type.
No one has followed this question yet.