I am trying to create an assembly from a specific dll. The command which I execute is
CREATE ASSEMBLY "xx.xx.blobviewer" from 'D:\xx\xx\xx\BlobSniffer\BlobSniffer.dll' WITH PERMISSION_SET = unsafe
The message I get for the response is:
Assembly 'BlobSniffer' references assembly 'system.runtime.serialization, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.
I tried to copy requested .net dll-s to the BlobSniffer folder, but after i copy all the referenced assemblies i get this:
CREATE ASSEMBLY for assembly 'BlobSniffer' failed because assembly 'microsoft.visualbasic.activities.compiler' is malformed or not a pure .NET assembly. Unverifiable PE Header/native stub.
First question, why did I even need to copy .net assemblies, weren't they supposed to be retrieved automatically?
Second question, what is wrong with the assembly being flagged as malformed? The assembly is also part of the .net framework and there are no external classes.