diff --git a/RomRepoMgr.Core/Base32.cs b/RomRepoMgr.Core/Base32.cs
index 99c3b6b..6de44c8 100644
--- a/RomRepoMgr.Core/Base32.cs
+++ b/RomRepoMgr.Core/Base32.cs
@@ -11,7 +11,7 @@ using RomRepoMgr.Core.Resources;
namespace RomRepoMgr.Core;
/// Class used for conversion between byte array and Base32 notation
-public sealed class Base32
+public static class Base32
{
/// Size of the regular byte in bits
const int _inByteSize = 8;
diff --git a/RomRepoMgr.Core/Filesystem/Vfs.cs b/RomRepoMgr.Core/Filesystem/Vfs.cs
index a2dd94d..a6ff16b 100644
--- a/RomRepoMgr.Core/Filesystem/Vfs.cs
+++ b/RomRepoMgr.Core/Filesystem/Vfs.cs
@@ -3,6 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using System.Threading;
using System.Threading.Tasks;
using RomRepoMgr.Database;
using RomRepoMgr.Database.Models;
@@ -418,12 +419,20 @@ public class Vfs : IDisposable
{
if(!_streamsCache.TryGetValue(handle, out Stream stream)) return -1;
- lock(stream)
+ using var rwLock = new ReaderWriterLockSlim();
+
+ try
{
+ rwLock.EnterReadLock();
+
stream.Position = offset;
return stream.Read(buf, 0, buf.Length);
}
+ finally
+ {
+ rwLock.ExitReadLock();
+ }
}
internal bool Close(long handle)
diff --git a/RomRepoMgr.Core/RomRepoMgr.Core.csproj b/RomRepoMgr.Core/RomRepoMgr.Core.csproj
index 355185e..a5b3ae6 100644
--- a/RomRepoMgr.Core/RomRepoMgr.Core.csproj
+++ b/RomRepoMgr.Core/RomRepoMgr.Core.csproj
@@ -13,6 +13,43 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/RomRepoMgr.Database/RomRepoMgr.Database.csproj b/RomRepoMgr.Database/RomRepoMgr.Database.csproj
index 4d6a30b..dc080a0 100644
--- a/RomRepoMgr.Database/RomRepoMgr.Database.csproj
+++ b/RomRepoMgr.Database/RomRepoMgr.Database.csproj
@@ -14,6 +14,43 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/RomRepoMgr.Settings/RomRepoMgr.Settings.csproj b/RomRepoMgr.Settings/RomRepoMgr.Settings.csproj
index b4221d0..5b56519 100644
--- a/RomRepoMgr.Settings/RomRepoMgr.Settings.csproj
+++ b/RomRepoMgr.Settings/RomRepoMgr.Settings.csproj
@@ -8,6 +8,43 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/RomRepoMgr/Program.cs b/RomRepoMgr/Program.cs
index 1bfd18b..335c73b 100644
--- a/RomRepoMgr/Program.cs
+++ b/RomRepoMgr/Program.cs
@@ -29,7 +29,7 @@ using Avalonia.ReactiveUI;
namespace RomRepoMgr;
-internal class Program
+internal static class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
diff --git a/RomRepoMgr/RomRepoMgr.csproj b/RomRepoMgr/RomRepoMgr.csproj
index fecc769..8fdfb0d 100644
--- a/RomRepoMgr/RomRepoMgr.csproj
+++ b/RomRepoMgr/RomRepoMgr.csproj
@@ -27,6 +27,43 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+