2

I met a highly disturbing issue. I wrote a C# application in Visual Studio Community which uses a local .mdf database file.

My computer's operating system is Windows 10 Home, 64 bit. My problem is that I cannot run the compiled EXE file on certain computers. Previously I used it on a computer running 32-bit Windows 7 Professional, with no problems.

After upgrading it to Windows 10 Pro, 32 bit, the application starts, but it crashes when it comes to an SQL command:

"The application was unable to start correctly. 0xC0000142".

I reinstalled the Microsoft SQL Server 2014 Express Local database, performed a system cleaning but the problem persists. My setting in Visual Studio is 'Any CPU'. I tried to run the EXE in the debug folder and also the one in the release folder. On 64-bit Windows Home everything is just fine with either of the .exe files. On 32 bit Professional, on the other hand, 0xC0000142 error again.

I tried another computer with 64-bit Windows 10 Home and Microsoft SQL Server 2014 Express Local DB: the application runs without problem. I guess some DLL files cause the problem, but neither can I track the source of the problem nor fix it. Does anybody have any suggestions?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Joseph
  • 21
  • 3
  • Try and compile the application in x86 mode. https://msdn.microsoft.com/en-us/library/zekwfyz4.aspx – Maximilian Riegler Apr 15 '16 at 10:42
  • Are you just copying the .exe file between machines? You may have more luck if you create an installer package. Check this maybe: http://stackoverflow.com/questions/16946173/best-way-to-deploy-visual-studio-application-that-can-run-without-installing or this: https://msdn.microsoft.com/en-us/library/t71a733d.aspx – GregHNZ Apr 15 '16 at 10:51
  • Google "show loader snaps". – Hans Passant Apr 15 '16 at 11:57

0 Answers0