Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Send an Email from sql server using CLR Assembly (microsoft modern authentication)

$
0
0

I have created class library project to send an email using Azure.Identity, Microsoft.Graph. after that i complied into DLL when i try to create Assembly in SQL Server it throwing error

Assembly 'MSGraphMail' references assembly 'system.runtime.compilerservices.unsafe, version=4.0.4.1,

  1. how to find perferct version of my dll refers i.e version=4.0.4.1
  2. how to package all the dlls which is reference in my class library project i.e exactly what they want

Thanks for your time to help

CREATE ASSEMBLY PhoenixMail FROM 'C:\MSGraphMail.DLL' WITH PERMISSION_SET = UNSAFE

Assembly 'MSGraphMail' references assembly 'system.runtime.compilerservices.unsafe, version=4.0.4.1, culture=neutral, publickeytoken=b03f5f7f11d50a3a.', 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: version, culture or public key mismatch). Please load the referenced assembly into the current database and retry your request.Assembly 'System.Text.Json' references assembly 'system.runtime.compilerservices.unsafe, version=4.0.4.1, culture=neutral, publickeytoken=b03f5f7f11d50a3a.', 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: version, culture or public key mismatch). Please load the referenced assembly into the current database and retry your request.

I also created system.runtime.compilerservices.unsafe but still it throwing same error


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>