This started happening a week or so ago. I thought I'd stuffed something up, so I rebuilt a small project with just this one call to load a texture, and it's still happening. I'm starting to think this isn't my code and something in Visual Studio has broken. When i try to step into a function that is throwing the exception, the exception is thrown before any user code is executed in the function. I've put a break point on the first line in that fn and it's never reached.
public static async Task<Texture> LoadTextureAsync(string debugName, Folders folder, string filePath)
{
BitmapSource bitmapSource = await LoadBitmapSourceAsync(folder, filePath);
When i try to step into the LoadBitmapSourceAsync method, having put a breakpoint inside that method on the first line of code I get the following output ..
Step into: Stepping over non-user code 'Engine.Core.FileIo.LoadBitmapSourceAsync'
Step into: Stepping over non-user code 'Engine.Core.FileIo.<LoadBitmapSourceAsync>d__5..ctor'
Exception thrown: 'System.IO.FileLoadException' in System.Private.CoreLib.dll
And execution has returned out to
Texture texture = await FileIo.LoadTextureAsync("DebugTexture", Folders.Installation, "Assets\\DwarfPortrait.png");