I have a CLR project that calls a simple HTTP service. Its x64 targeting, and I got it for proper serialization only by going through the steps described in the following link, which talks about the changes needed for VS2010 to point to the correct target architecture (x64) - changes that are only needed for unloading and changes. csproj with a few extra lines to link to the correct version of sgen.exe: http://geekswithblogs.net/akraus1/archive/2011/12/10/148002.aspx
Now I can create this project and its .XmlSerializers.dll by setting "Generate Serialized Assembly" to. I want to do this because my CLR project will be deployed in the database, and I do not want it to start serializing any objects, since these DLLs are not referenced in my database, and I do not want to grant my rights to the CLR project above. than EXTERNAL_ACCESS for security reasons, because it will be used in a production environment where security is important, and also because my database is NOT trustworthy.
In short, I follow the guide at the following link to load my serialized assembly into the database, but I get an error message: http://footheory.com/blogs/bennie/archive/2006/12/07/invoking-a- web-service-from-a-sqlclr-stored-procedure.aspx
Error: CREATE ASSEMBLY for assembly '.XmlSerializers' failed because the assembly was built for an unsupported version of the Common Language Runtime.
Does anyone know how to fix this by causing sgen.exe to serialize a build version that supports the CLR? Viva the Stack.
source share