I have a problem that when I move the release folder of the application to the destination server and run the application it says “Could not load file or assembly or one of its dependencies”.
I think I know where it comes from, but what I dont know is how to fix it.
In my program I use 4 external dlls AntiXSSLibrary, HtmlSanitizationLibrary, MySql.Data and MySql.Data.Entity. When I “add reference” in visual c# 2010 express and build the solution I can see in the bin/release folder only 2 dlls – AntiXSSLibrary and HtmlSanitizationLibrary(and their xml). The MySQL dlls dont appears there – one of them is the dll that shown on the exception error message – and I dont know why it doesnt copy them to there too. BTW if I copy them myself it doesnt help..
On my computer – where the program is been build – it runs ok.
Thanks for any help.
EDIT
Another thing that caught my eye is on the last line of the stack “at … Program.Main… IN C:\Users\AAA\Documents\Visual Studio 2010…..\Program.cs line 12”
WHY is it trying to access my build location + cs file where I’m it in my prod server and running the exe from different location..? you can see in the picture the hole thing:

The AntiXSSLibrary and HtmlSanitizationLibrary were build as .net 2.0 and the mysql was 4.0. Since I dont have the AntiXSSLibrary and HtmlSanitizationLibrary in 4.0 I’ve putted the mysql 2.0 build. That fixed the problem.