I have run into this issue a few times now, and I did manage to get it working once, but again since then, it is refusing to cooperate.
I have tried this solution, to ensure all projects are being built, I have attempted to locate the file in question, but this doesn't solve the problem either.
I decided to look at the Disassembly, and for some reson it is looking in a completely separate directory?
- Where the program is looking (according to disassembly): C:\Users[...]\ Visual Studio 2010 \Projects[…]\Connect_DBEngine_MySQL\MySQLFunctions.cs
- Where the file actually exists: C:\Users[...]\ Visual Studio 2015 \Projects[…]\Connect_DBEngine_MySQL\MySQLFunctions.cs
The disassembly report:
--- C:\Users\Benjamin\Documents\Visual Studio 2010\Projects\SVN\DCIM\Connect_DBEngine_MySQL\MySQLFunctions.cs
0140E11C push esi
0140E11D push ebx
0140E11E sub esp,34h
0140E121 xor eax,eax
0140E123 mov dword ptr [ebp-10h],eax
0140E126 mov dword ptr [ebp-1Ch],eax
0140E129 mov dword ptr [ebp-3Ch],ecx
0140E12C mov dword ptr [ebp-40h],edx
0140E12F cmp dword ptr ds:[5CB9FE0h],0
0140E136 je 0140E13D
0140E138 call 6827FA00
0140E13D nop // This line is highlighted, like a breakpoint?
0140E13E mov edx,dword ptr [ebp-3Ch]
0140E141 mov eax,dword ptr [ebp-40h]
0140E144 lea edx,[edx+4]
0140E147 call 67EDEC20
0140E14C nop
0140E14D lea esp,[ebp-0Ch]
0140E150 pop ebx
0140E151 pop esi
0140E152 pop edi
0140E153 pop ebp
0140E154 ret
--- No source file -------------------------------------------------------------
EDIT as per comments:
- I am using VS 2015, .NET 4.0.
The error I am getting is "The source file is different to the one that was built", when I attempt to run the program.
The file that is failing is another project in the same solution.
I have ensured all the relevant projects (including this one) are being built (in the Configuration manager)
The project is loaded as a reference to the Main project (file(s) are in the appropriate bin folder)