Friday 30 August 2013

Could not load file or assembly "" or one of its dependencies. The system cannot find the file specified

I got the above exception while deploying the code.So I quickly checked the following things.

1.Public Key of the assembly and it is correct.
2.Version of the assembly and it is updated one.But still I got the same error.

So I followed below steps and it worked.

1.Copy the dll and paste it any where in the server.
2.Open Start->Microsoft Visual Studio 2010->Visual Studio Tools->Visual Studio Command Prompt(2010)

Run the command below:

gacutil /i "Path of the assembly where it is located"

It will install the assembly into Global Assembly Cache.

3.Add it to the respective application bin folder.(Some times it is not needed)
4.Drag and Drop the dll file into "C:\Windows\assembly" folder(Optional)

Above steps resolved my problem.

No comments:

Post a Comment