i create a 3 layer winforms c# application.
the layer names are BLogic, DAccess and Presentation.
but when i want to run the application in debug directory the application throws an exception with this message: Could not load file or assembly 'BLogic, Version=1.0.0.0. Culture=neutral, PublicKeyToken=null' or one of its dependencies. the system cannot find the file specified.
how can i resolve this problem???
Asked
Active
Viewed 44 times
0

robert
- 21
- 2
-
Did you build the whole project first ? (ctrl+shift+b) – Cid May 07 '20 at 11:29
-
delete all the files in every bin & obj folder in the solution, then try running again. – Neil May 07 '20 at 11:30
1 Answers
0
#1 Delete all the files in every bin & obj folder in the solution, then try running again.
#2 Does the Presentation assembly have a dependency on just the BLogic, or the DAccess too? Sometimes if the Presentation depends on the BLogic, and the BLogic depends on the DAccess, then VS doesn't copy the DAccess assembly to the presentation bin folder.

Neil
- 11,059
- 3
- 31
- 56
-
thanks dear @Neil for your answer, in my solution i add the BLogic and DAccess to Presentation's References and DAccess to BLogic's References. and after deleting every files in bin and obj folders i can't run the program from debug folder and i can just run it sometimes from VS. – robert May 08 '20 at 00:52