Monday, July 03, 2006 9:10 PMI ran the following:
CREATE ASSEMBLY A3rdPartyDLL
FROM 'C:\Program Files\3rdPartyComponents\3rdParty.dll'
WITH PERMISSION_SET = EXTERNAL_ACCESS
and got the following error message:
Assembly 'A3rdPartyDLL' could not be installed because existing policy would keep it from being used.
How can I change the 'existing policy'?
Tuesday, July 04, 2006 5:45 AMModeratorDO you think that external_access is enough for this library ? External_access is more restricted than UNSAFE. Perhaps the library uses some functionality which are need the permission set UNSAFE ? Did you already tried that ?
For an overview of the permissions granted in the permission sets, have a look here:
HTH, Jens Suessmeyer.
Tuesday, July 04, 2006 12:00 PM
I've tried all three: SAFE, EXTERNAL_ACCESS & UNSAFE. I get the same message everytime. But, thanks for the link.
Tuesday, July 04, 2006 6:53 PM
This message means that although the assembly itself is fine, some type of machine configuration would prevent it from running under Sql Server. The error message isn't very specific, but you should be able to fix the problem using the mscorcfg.msc tool to examine the existing assembly, machine, and publisher policies enforced on the server. The tool is documented here: http://msdn2.microsoft.com/en-us/library/2bc0cxhc.aspx
The section you want to look at is Runtime Security Policy to see if there is anything suspicious set for 3rdParty.dll, such as assembly redirection or an explicit bind to an outdated assembly version.
You could also try using the Fusion Log Viewer http://msdn2.microsoft.com/en-us/library/e74a18c4.aspx to see if there are any log messages displayed during assembly load that will contain more information about the specific problem.
Wednesday, July 05, 2006 8:12 PM
right on. I get the same error regardless of how CREATE ASSEMBLY is called / used.
Anybody else out there got a minute to try. just create a VB/C# DLL that refers to Interop.Outlook.dll and make an appointment object. Then see if you can CREATE ASSEMBLY that DLL from SQL SERVER 2005.
free case of beer if you can. I aint kidding. I'll send you cash or something ! and I'm talking good beer, not like bud light.
Saturday, July 08, 2006 12:52 PM
Thanks for the info. Unfortunately, it does not resolve this problem.
Tuesday, January 09, 2007 1:13 AM
I'm running into the same problem. An external assembly I'm referencing (XMLTask.dll) apparently has dependancies on WindowsForms.dll. Tried setting TrustWorthy to ON, but didn't help :(
Assembly 'System.Windows.Forms' could not be installed because existing policy would keep it from being used.
Tuesday, January 09, 2007 2:49 PM
Often times the problem being reported really means this:
Assembly 'A3rdPartyDLL' or another binary that A3rdPartyDLL depends on or uses could not be installed because existing policy would keep it from being used.
So, first check on what else 'A3rdPartyDLL' needs. It's "all or none" in terms of the GAC knowing about a set of interdependent files.
Tuesday, January 09, 2007 10:42 PMIs there a way I can remove a particular dependancy from the 3rd party dll, if I know my particular call is not usng it?
Thursday, January 11, 2007 3:53 PMnope
Tuesday, October 07, 2008 4:39 PMCheck this out: When I try to add the assembly to the machine - Policy Assemblies section and I get the following error message: Unable to add the selected assembly. The assembly must have a strong name (name, version and public key).
Tuesday, May 29, 2012 8:11 AM
This is not an answer to this question. This may be a way to try to diagnose the question, but not an answer to it.
FYI, the fusion log offers absolutely no help.