diff --git a/src/lib/PnP.Framework/PnP.Framework.csproj b/src/lib/PnP.Framework/PnP.Framework.csproj index 49eebe7b9..e730e549e 100644 --- a/src/lib/PnP.Framework/PnP.Framework.csproj +++ b/src/lib/PnP.Framework/PnP.Framework.csproj @@ -2,7 +2,7 @@ netstandard2.0;net8.0;net9.0 - 10.0 + 13.0 PnP.Framework PnP.Framework 1.17.0 @@ -250,6 +250,16 @@ + + + all + analyzers + + + + + + diff --git a/src/lib/PnP.Framework/TimerJobs/Utilities/SiteEnumeration.cs b/src/lib/PnP.Framework/TimerJobs/Utilities/SiteEnumeration.cs index ed98db2f7..301c2bf34 100644 --- a/src/lib/PnP.Framework/TimerJobs/Utilities/SiteEnumeration.cs +++ b/src/lib/PnP.Framework/TimerJobs/Utilities/SiteEnumeration.cs @@ -16,7 +16,7 @@ internal class SiteEnumeration #region Singleton implementation // Singleton variables private static volatile SiteEnumeration instance; - private static readonly object syncRoot = new Object(); + private static readonly Lock syncRoot = LockFactory.Create(); // Singleton private constructor private SiteEnumeration() { } diff --git a/src/lib/PnP.Framework/Utilities/Cache/InMemoryCacheProvider.cs b/src/lib/PnP.Framework/Utilities/Cache/InMemoryCacheProvider.cs index 612eb5f01..cec9ba99a 100644 --- a/src/lib/PnP.Framework/Utilities/Cache/InMemoryCacheProvider.cs +++ b/src/lib/PnP.Framework/Utilities/Cache/InMemoryCacheProvider.cs @@ -8,7 +8,7 @@ namespace PnP.Framework.Utilities.Cache public class InMemoryCacheProvider : ICacheProvider { private readonly Dictionary _cacheStore = new Dictionary(); - private readonly object _syncRoot = new object(); + private readonly Lock _syncRoot = LockFactory.Create(); /// /// Gets an item from the cache diff --git a/src/lib/PnP.Framework/Utilities/Cache/MsalCacheHelperUtility.cs b/src/lib/PnP.Framework/Utilities/Cache/MsalCacheHelperUtility.cs index 75a409832..4120ac8ce 100644 --- a/src/lib/PnP.Framework/Utilities/Cache/MsalCacheHelperUtility.cs +++ b/src/lib/PnP.Framework/Utilities/Cache/MsalCacheHelperUtility.cs @@ -9,7 +9,7 @@ public class MsalCacheHelperUtility { private static MsalCacheHelper MsalCacheHelper; - private static readonly object ObjectLock = new(); + private static readonly Lock ObjectLock = LockFactory.Create(); private static class Config {