This is in debug mode. Changed to mixed mode debugging. This app does potentially call SharpDX. Although no SharpDX code get's a chance to run in this case. When i turned on mixed mode debugging, I get some extra output .. (note: I changed namespace here from core to serialization, it's not relevant, it was just a tidy up as i was looking through it)
Step into: Stepping over non-user code 'Engine.Serialization.FileIo.LoadBitmapSourceAsync'
Step into: Stepping over non-user code 'Engine.Serialization.FileIo.<LoadBitmapSourceAsync>d__5..ctor'
Exception thrown at 0x76BF4192 in DemoLoadingData.exe: Microsoft C++ exception: EEFileLoadException at memory location 0x0993B93C.
Exception thrown at 0x76BF4192 in DemoLoadingData.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x76BF4192 in DemoLoadingData.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown at 0x76BF4192 in DemoLoadingData.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.
Exception thrown: 'System.IO.FileLoadException' in System.Private.CoreLib.dll
Further, this started happening across projects after I tried to prepare a small app for submission to the store. So I may have run some package generation tools in Visual Studio.
I don't get any Exception popups, i guess the exception is not being caught, and execution is falling out to the first calling function.
So when I run it in release, my breakpoint inside the LoadBitmapSourceAsync method is hit and i can step through the code without those exception. It seems to run normally until it reaches, in this case, an expected NullReferenceException, because I haven't setup WIC Factory.
I didn't even know breakpoints would work in release mode.
It only happens in Debug. I checked my other project and it's the same, it's working in release.