1

I cannot add an Additional Assembly (DLL) via my Event Receiver Package settings. When I attempt to deploy, I get the following error:

3>  Deploying solution 'EventReceiver.wsp'...
3>Error occurred in deployment step 'Add Solution': Error: Cannot add the specified assembly to the global assembly cache: ExampleLibrary.dll.

Also, I can manually install the DLL to the GAC (using Gacutil) and it works fine in a test Windows Forms application. However, if I register the assembly details in the SharePoint Web.config in the <compilation section, I get the following error:

Parser Error Message: Could not load file or assembly 'ExampleLibrary, Version=4.6.0.0, Culture=neutral, PublicKeyToken=XXX' or one of its dependencies. The system cannot find the file specified.

I image the issues are related - what could be the problem here?

If I use the provided .NET 2.0 versions of the DLL it still fails. Checking the DLL with CORFLAGS shows the following:

Version   : v2.0.50727
CLR Header: 2.5
PE        : PE32
CorFlags  : 0x9
ILONLY    : 1
32BITREQ  : 0
32BITPREF : 0
Signed    : 1

... so it doesn't appear to be a 32-bit issue. How can I resolve this?

1

Maybe a stupid question but have you set the Deployment Target for the assembly to be GlobalAssemblyCache in the Package configuration?

0

Make sure you are local administrator on the server and an administrator within the SharePoint farm where you are trying to deploy this assembly. You usually get this error because of assembly not strongly typed but as in your case you can install it manually so it's permissions issue.

1
  • I'm already a Local Admin, SharePoint Farm and Site Collection Administrator.
    – PeterX
    Oct 29 '13 at 22:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.