The title of the post kind of says it all, but here is my procedure to replicate:
Create a new test DB using the command prompt:
SqlLocalDB create testdb
SqlLocalDB start testdb
SqlLocalDB stop testdb
Create a new .Net 4.7 Console app name it anything other than Launcher and populate the main method with:
System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; startInfo.FileName = @"C:\Program Files\Microsoft SQL Server\120\Tools\Binn\SQlLocalDB.exe"; startInfo.Arguments = "start testdb"; process.StartInfo = startInfo; process.Start(); process.WaitForExit();
Run the app, it should start the db, you can check in the console with:
SqlLocalDB info testdb
Stop the DB with:
SqlLocalDB stop testdb
After making the change I get a pop-up error from sqlservr.exe saying: "The application was unable to start correctly (0xc0000142). Click OK to close the application.
Checking the event log I see this matched to the error:
Windows API call WaitForMultipleObjects returned error code: 575. Windows system error message is: {Application Error} The application was unable to start correctly (0x%lx). Click OK to close the application. Reported at line: 3728
I have found the name of the executable just needs to include Launcher for the issue to occur, and you don't need to go back and re-compile to produce the error, just renaming the executable file name does it.
A "solution" is just to rename the executable but that is some strong magic wand programming and there must be some actual cause behind all this, but I have yet to find one.
User contributions licensed under CC BY-SA 3.0