Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Errors on creating assembly from global dlls Expand / Collapse
Author
Message
Posted Wednesday, September 3, 2008 12:56 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, May 26, 2009 5:00 AM
Points: 9, Visits: 42
Hi

I am facing problems in creating assemblies from global dlls, which are redirected to particular version by publisher policy binding. Following is the exact scenario:

1) I have a set of dlls that is deployed in GAC. These dlls are chain of dlls referencing each other.
2) A seperate caller dll. We want to create assembly of this dll. This dll uses the global dlls.
3) Created assemblies and stored procedure from the caller dll successfully.
4) Modify the shared dll and redirect its version to latest through publisher binding policy.
5) Drop the sql server assembly and try to recreate it. This gives error
Assembly 'SMSPTED2' references assembly 'smhtmlparser, version=2.0.1.0, culture=neutral, publickeytoken=4c52148b4fb034d1.', 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 have other desktop applications that are also using these global dlls and they are working fine in this scenario.

If I compile all the dlls and re-deploy them into GAC, then it creates the SQL assemblies successfully.

I want to deploy the global dlls on many machines and it is not possible to compile each dll every time.

I have googled it but found nothing about that. Is there any solution to this problem?

Ankur
Post #562840
Posted Thursday, September 4, 2008 6:36 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, September 2, 2014 1:10 PM
Points: 1,708, Visits: 1,793
Rather than trying to have SQL pull from the GAC, create the assemblies from a local folder path explicitly.

Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs
Post #563736
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse