Skip to content

Commit

Permalink
Also catch type initialization errors when attempting to load types t…
Browse files Browse the repository at this point in the history
…hat might not exist (#32938)

Since it appears that they can exist but be the wrong version for us to use.

Fixes #32614
  • Loading branch information
ajcvickers committed Jan 28, 2024
1 parent 1b51aa3 commit e5cf974
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Microsoft.Data.Sqlite.Core/SqliteConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ static SqliteConnection()
storageFolderType = Type.GetType("Windows.Storage.StorageFolder, Windows, ContentType=WindowsRuntime")
?? Type.GetType("Windows.Storage.StorageFolder, Microsoft.Windows.SDK.NET");
}
catch (FileLoadException)
catch (Exception)
{
// Ignore "Could not load assembly."
// Ignore "Could not load assembly." or any type initialization error.
}

object? currentAppData = null;
Expand Down

0 comments on commit e5cf974

Please sign in to comment.