Why C# program does not start from the compilation folder?

Hello.
Use VS2015 Community.
Developed the application on one machine, then moved the project to another (probably crooked).
The program kompilacja without errors, however when I attempt to launch - crash error. If you run out of the Studio (in debug), it crashes the exception "system badimageformatexception".

If the program is put in any other folder it runs without any problems. Do not prompt, what it is and how to fix it? Thank you.
July 9th 19 at 11:16
1 answer
July 9th 19 at 11:18
Solution
DefaultCPU x64 x86 x86-prefer
Did. The effect, unfortunately, zero - xzavier10 commented on July 9th 19 at 11:21
Did what?)I do not propose to do.
Most likely You have different at a computer the bit Windows,
You need to consider ,to think about what kind of cpu it is possible to compile, given naleye unmanaged dll - mercedes commented on July 9th 19 at 11:24
: Made in adding configurations) On two machines Окно7, 64. - xzavier10 commented on July 9th 19 at 11:27
Not the managed DLL is? Somewhere a bit used? If not,under anycpu compile. - mercedes commented on July 9th 19 at 11:30
: unmanaged no. At first the car started and debajyoti under any bit depth. Compilation is no problem on any bitness. The problem only occurs when running from build folder. I.e. Assembly takes place in bin/x64/Debug/app_name.exe. If you run from this folder - error. If you move the file to any other folder - all approx. Sin on .pdb file. It seems necessary to deal with it. - xzavier10 commented on July 9th 19 at 11:33
It looks like science fiction. The project is not a secret? - mercedes commented on July 9th 19 at 11:36
if you are in terms of "digging", then I'm sorry, can not share. For the help - thanks, I'll go dig in the side .pdb - xzavier10 commented on July 9th 19 at 11:39
Not scary . It yuzayte https://msdn.microsoft.com/ru-ru/library/e74a18c4(... can help .
Good luck) - mercedes commented on July 9th 19 at 11:42
: the problem was in App.config helped your suggestion, thanks again) - xzavier10 commented on July 9th 19 at 11:45
Can you give more details?
Again please) - mercedes commented on July 9th 19 at 11:48
: when migrating a project I accidentally grabbed the App.config. Studio when you create a project from existing source it lifted and threw the folder to the program in the debug \ release. Have not delved into the architecture of this language, but apparently created the program "picks up" the configuration file by reading him some options. One of the options was incorrect. Specifically: "supportedRuntime version". Certainly the option of reading this file in the bowels of the Studio to turn off God knows where. But that is for tomorrow. Google will give the answer. - xzavier10 commented on July 9th 19 at 11:51
Hmm, strange story, if you will understand more, accomplish your goal pzhl, very интересно.@кра6ии: - mercedes commented on July 9th 19 at 11:54

Find more questions by tags C#ProgrammingExceptionsOperating systems