Binding Failure : The assembly with display name 'Microsoft.Practices.ServiceLocation' failed to load in the 'Load' binding context of the AppDomain with ID 2.

Issue :



BindingFailure was detected
Message: The assembly with display name 'Microsoft.Practices.ServiceLocation' failed to load in the 'Load' binding context of the AppDomain with ID 2. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Reason and Solution:

This happens when the required dll was not present in your References. Most cases this will get solved bu adding the Microsoft.Practices.ServiceLocation dll to your references.
You can find this dll (in case u dont have any) from http://commonservicelocator.codeplex.com/
Download the dll and add it to the references. Rebuild the solution and press F5. This should execute without any failure.

Sometimes You already may have this assembly referenced and still facing this error. In such cases you can remove it from the references and add again. This should do the trick. 

Its actually the Managed Debugging Assistant gives you an alert about a potential problem . You can go to Debug--> Exceptions and unchecked the option .


10 comments:

  1. You can download Enterprise Library installation file, then use 7z to extract it to obtain the dll file.

    Or, you can go to https://servicelocation.codeplex.com/

    ReplyDelete
  2. I appreciate your efforts because it conveys the message of what you are trying to say. It's a great skill to make even the person who doesn't know about the subject could able to understand the subject . Your blogs are understandable and also elaborately described. I hope to read more and more interesting articles from your blog. All the best.

    rpa training in bangalore
    best rpa training in bangalore
    RPA training in bangalore
    rpa course in bangalore
    rpa training in chennai
    rpa online training

    ReplyDelete

  3. Does your blog have a contact page? I’m having problems locating it but, I’d like to shoot you an email. I’ve got some recommendations for your blog you might be interested in hearing.
    AWS Training in Chennai |AWS Training Course in Chennai
    AWS Training in Chennai | AWS Training in Chennai cost
    AWS Training in Chennai | Aws Training Institute in Chennai

    ReplyDelete

  4. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    microsoft azure training in bangalore
    rpa training in bangalore
    best rpa training in bangalore
    rpa online training

    ReplyDelete
  5. This is ansuperior writing service point that doesn't always sink in within the context of the classroom. In the first superior writing service paragraph you either hook the reader's interest or lose it. Of course your teacher, who's getting paid to teach you how to write an good essay, 
    AWS training in sholinganallur
    AWS training in Tambaram
    AWS training in Velachery

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete