1

I have only .dll file. I have assigned strong name to dll using ilasm command. I want to register it in GAC but i am getting following error:

Dll Name :DDayICal.dll

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools>gacutil -i "C:\Users\Administrator\Desktop\DDayICal.dll.dll" Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved.

Failure adding assembly to the cache: The system cannot find the file specifie d.

2
  • 2
    It's called DDayICal.dll.dll? Not just DDayICal.dll
    – eirikb
    Oct 20 '12 at 12:53
  • Sorry Its my mistake. just DDayICal.dll Oct 20 '12 at 13:02
1

Make sure the dll you downloaded matches your development machine as if both are for x86 processors or if they are for 64 bit, if that's fine then just drag and drop DDayICal.dll to Gac and do a IISReset, and reference it to your project as well, it should work straight away without giving an error for strong file name, however you should check these links out as they got similar type of problem,

https://stackoverflow.com/questions/6199246/how-to-show-a-reference-of-the-shared-assembly-in-the-net-add-reference-dialog

http://www.csharp411.com/adding-assemblies-to-the-visual-studio-add-reference-dialog/

https://stackoverflow.com/questions/2068159/could-not-load-file-or-assembly-microsoft-mshtml-strong-name-validation-fai

EDIT another way of resolving problem you got,

http://social.msdn.microsoft.com/Forums/pl/csharpgeneral/thread/435cd65e-48c3-4a1d-965f-191bd80e9896

Hope it helped :)

3
  • Drag and Drop strategy for Dlls into Gac isn't recommended FYI. Oct 20 '12 at 13:48
  • you should be creating a solution file using wsp builder for your webpart :) Oct 20 '12 at 13:49
  • I think so You are right..But I have registered dll in Microsoft.net > GAC_MSIL.. But again it gives error "Could not load assembly. The system can not find the File specified." And not working drag and drop strategy for this dll.. It's third party dll. So I have no code. Plz help me.. Its urgent.. Oct 22 '12 at 4:43
1

Just execute the next bit running as local administrator.

[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")            
$publish = New-Object System.EnterpriseServices.Internal.Publish            
$publish.GacInstall("C:\SolutionFolder\MyComponent.dll")
iisreset
-2

Instead of using drag and drop, use powershell or gacutil.

Powershell example: http://technicaltrix.blogspot.dk/2014/10/install-dll-in-gac-using-powershell.html

GACUtil: https://stackoverflow.com/questions/2182316/how-to-register-a-net-dll-in-gac

1
  • a server would not have gacutil
    – Pantani
    Jan 6 '16 at 9:12

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.