Click here to Skip to main content
13,054,779 members (72,339 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I got the error:
Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file...

What could be the reason for this error. I tried to google it....But it didnt solve my issue. My reference version seems to be the same...

Any help is greatly appreciated.
Posted 22-Mar-13 3:22am
Updated 22-Mar-13 3:53am
ThePhantomUpvoter 22-Mar-13 9:26am
The error is fairly obvious isn't it? The system can't find the file. Did you deploy the file with your application? Did you deploy all of the files dependencies with it?
vidkaat 22-Mar-13 9:38am
I did..
ThePhantomUpvoter 22-Mar-13 10:11am
Well apparently you did not. Otherwise you would not be getting the error right?
Dave Kreskowiak 22-Mar-13 10:38am
Did you install the entire library or just copy the one .DLL?? Chances are good you copied just the .DLL. If that .DLL has dependencies on other library components, it'll throw this error. You have to deploy the entire library, not just one little piece of it.
vidkaat 22-Mar-13 9:38am
I did...
ryanb31 22-Mar-13 9:55am
The system can't find the file, either because it isn't there or because permissions are not high enough.
vidkaat 22-Mar-13 11:08am
Where shud i look for it?
ryanb31 22-Mar-13 11:21am
See solution 1. It will need to be in your bin folder of your app and for that to happen you should set your reference to Copy Local.
vidkaat 22-Mar-13 12:18pm
Yes i did and i could see the dll in the bin folder i have set.But still i get this error.
ryanb31 22-Mar-13 12:28pm
Then possibly you have a permissions issue or is it a 64 bit /32 bit issue?
vidkaat 22-Mar-13 12:30pm
32 bit machine is mine....I tried changing the Read -only property of the bin folder...Nothing seems to work....Any other suggestion will be greatly helpful.Thanks.
ryanb31 22-Mar-13 12:33pm
Is this error on your machine or on a server?
ryanb31 22-Mar-13 12:34pm
Here's where you can download it,

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Tell us more about your application then we might be able to help you resolve the problem.

Any dlls that are listed in the References section of your application need to have their Copy Local property set to True except when the dll is part of the .Net framework or it's a dll that is part of other software that's already installed on the computer where your app will run.
vidkaat 22-Mar-13 11:25am
My application is a Data loader. Its basically referencing the BLL which in turn reference DAL.
In my application i read the path of the file which is placed in my local folder is loaded into the database. I get this error wen i change my app.config very frequently..Let me know if you need more info...Thanks
phil.o 22-Mar-13 13:06pm
"In my application i read the path of the file which is placed in my local folder is loaded into the database."

This is unclear. You mean that you read a local path, store it in a database, move your app on another machine, and try to load the file from the databse-stored value ? Why ?
vidkaat 22-Mar-13 11:41am
Copy Local Property is set to true..But still i get the error..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 22 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100