[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 
Msg 6586 Assembly could not be installed

 

 

Home
Analysis Services
Azure
CLR Integration
High Availability
Open Source
Security
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019
Tips
Troubleshooting
Tuning

Msg 6586 Assembly could not be installed.


Applies to: SQL Server 2019.

Date created: June 14, 2020.
 

Problem Description.
 

Before importing a bacpac on a newly created database I had to create a few assemblies for CLR functions that are part of the bacpac. However, I received the following error with one of them.


Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.
Configuration option 'clr enabled' changed from 1 to 1. Run the RECONFIGURE statement to install.
Warning: The Microsoft .NET Framework assembly 'system.drawing, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.

Msg 6586, Level 16, State 1, Line 18
Assembly 'System.Drawing' could not be installed because existing policy would keep it from being used.


Msg 6586 Assembly could not be installed
Warning: The Microsoft .NET Framework assembly 'system.drawing, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a, processorarchitecture=msil.' you are registering is not fully tested in the SQL Server hosted environment and is not supported. In the future, if you upgrade or service this assembly or the .NET Framework, your CLR integration routine may stop working. Please refer SQL Server Books Online for more details.

Msg 6586, Level 16, State 1, Line 23
Assembly 'System.Drawing' could not be installed because existing policy would keep it from being used.


Completion time: 2020-06-11T19:13:14.4193113-07:00





 

Cause.


SQL Server has a file Binn folder named sqlservr.exe.config.





That file contains the following policy.




 


In SQL Server 2012 and later version SQL CLR (Common Language Runtime) uses .NET 4, but the DLL I was using was compiled on an earlier version as you can see below:

 




 

Solution.


Try to compile the DLL on .NET 4 or obtain a .NET 4 version of the DLL, and try to create the assembly again.




 

 

 

.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.