Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
583a0ac
Upgrade projects and packages to net10.0
jasonsummers Dec 26, 2025
cd9432c
Convert legacy nUnit Assertions to constraint types.
jasonsummers Dec 27, 2025
9b0639e
Bump NUnit3TestAdapter to v6.0.1.
jasonsummers Dec 27, 2025
de4809c
First pass correcting 3rd party breakages.
jasonsummers Dec 27, 2025
f54f8a4
Breaking: Computed Metadata from Command Line no longer needs to be e…
jasonsummers Dec 27, 2025
012e558
Fix Statiq.Handlebars.Tests.
jasonsummers Dec 27, 2025
75d107f
Update delegate method signature in FileImporter.cs for compatability…
jasonsummers Dec 27, 2025
bdcc2e4
Remove unused AsLiquid method from RenderScriban as Liquid option no …
jasonsummers Dec 27, 2025
bc33177
Implement missing members in StatiqDocumentAccessor.cs and StatiqScri…
jasonsummers Dec 27, 2025
341e83e
Update EPPlus and CsvHelper configuration in Statiq.Tables.
jasonsummers Dec 28, 2025
5a48467
Update System.Linq.Async to 7.0.0 in Statiq.CodeAnalysis.csproj
jasonsummers Dec 28, 2025
7ff09a3
Refactor AnalyzeSymbolVisitor.cs to account for changes in underlying…
jasonsummers Dec 28, 2025
a5c5e23
Update AnalyzeCSharpTypesFixture.cs to reflect changes in underlying …
jasonsummers Dec 28, 2025
67f6dd2
Update Microsoft.NET.Test.Sdk to v18.0.1.
jasonsummers Dec 28, 2025
16f4edf
Resolve some of the new CodeAnalysis/Compiler Warnings. Supress others.
jasonsummers Dec 28, 2025
310fc36
Remove all 'Update' Package References as these are managed by Direct…
jasonsummers Dec 28, 2025
acb17f6
Pin Microsoft.CodeAnalysis packages to v4.10.0 to avoid complications…
jasonsummers Dec 28, 2025
713c549
Remove erronously added call to base.Dispose in JavaScriptEngine.cs
jasonsummers Dec 28, 2025
13e8977
Incorporate @girlpunk's fix for GetAccessibleMembersInThisAndBaseTypes.
jasonsummers Dec 29, 2025
dda6e7a
Pin System.Drawing.Common to 10.0.1 in Statiq.Less.csproj to remediat…
jasonsummers Dec 29, 2025
28128cc
Remove unneeded packages from Statiq.Core.csproj and Statiq.Testing.c…
jasonsummers Dec 29, 2025
3b019ab
Remove Nuget warning supressions.
jasonsummers Dec 29, 2025
bc3327d
Refactor JavaScriptEngine changes required by package updates.
jasonsummers Dec 29, 2025
d799ad8
Pin dependencies in Statiq.CodeAnalysis.csproj to resolve security is…
jasonsummers Dec 29, 2025
97032d0
Revert JSPool package back to 2.0.1 due to breakages in Statiq.Web.
jasonsummers Dec 29, 2025
f8322e1
Revert EPPlus to v4.5.2.1 in Statiq.Tables.csproj due to licensing is…
jasonsummers Dec 29, 2025
c31c0b8
Restore `AsLiquid` method in RenderScriban.cs and handle correctly.
jasonsummers Dec 29, 2025
5ca9146
Remove redundant 'Update' PackageReference from Statiq.Sass.csproj.
jasonsummers Dec 29, 2025
e668417
Bump TestConsoleApp.csproj to net10.0.
jasonsummers Dec 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904;CA1724</WarningsNotAsErrors>
<WarningsNotAsErrors>CA1724;CS0809;CS0618;CA1021;CA1040;CA1062;CA1710;CA1711;CA1720;CA1721;CA1725;SA1503;SA1117;SA1414;SA1142;VSTHRD110;ASPDEPR003</WarningsNotAsErrors>
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\LICENSE.md" Pack="true" PackagePath=""/>
<None Include="$(MSBuildThisFileDirectory)\icon.png" Pack="true" PackagePath="\"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All"/>
<PackageReference Include="Roslynator.Analyzers" Version="4.0.2" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="All"/>
<PackageReference Include="Roslynator.Analyzers" Version="4.15.0" PrivateAssets="All"/>
<!-- It appears as though there might be a performance issue in versions of Microsoft.VisualStudio.Threading.Analyzers past this at least through 17.0.64 -->
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.9.60" PrivateAssets="All"/>
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15" PrivateAssets="All"/>
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
using System.Threading;
using Spectre.Console.Cli;
using Spectre.Console.Cli.Unsafe;
using Statiq.Common;
Expand Down Expand Up @@ -108,15 +107,15 @@ public static TBootstrapper AddDelegateCommand<TBootstrapper>(
public static Bootstrapper AddDelegateCommand<TSettings>(
this Bootstrapper bootstrapper,
string name,
Func<CommandContext, TSettings, int> func)
Func<CommandContext, TSettings, CancellationToken, int> func)
where TSettings : CommandSettings =>
bootstrapper.ConfigureCommands(x => x.AddDelegate(name, func));

public static Bootstrapper AddDelegateCommand<TSettings>(
this Bootstrapper bootstrapper,
string name,
string description,
Func<CommandContext, TSettings, int> func)
Func<CommandContext, TSettings, CancellationToken, int> func)
where TSettings : CommandSettings =>
bootstrapper.ConfigureCommands(x => x.AddDelegate(name, func).WithDescription(description));

Expand Down
10 changes: 7 additions & 3 deletions src/core/Statiq.App/Commands/BaseCommand{TSettings}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ protected BaseCommand(

public IFileSystem FileSystem { get; }

public sealed override async Task<int> ExecuteAsync(CommandContext context, TSettings commandSettings)
public sealed override async Task<int> ExecuteAsync(CommandContext context, TSettings commandSettings,
CancellationToken cancellationToken = default)
{
// Set verbose tracing
if (commandSettings.LogLevel != LogLevel.Information)
{
ServiceCollection.Configure<LoggerFilterOptions>(options => options.MinLevel = commandSettings.LogLevel);
ServiceCollection.Configure<LoggerFilterOptions>(options =>
options.MinLevel = commandSettings.LogLevel);
}

// File logging
Expand Down Expand Up @@ -121,7 +123,9 @@ public sealed override async Task<int> ExecuteAsync(CommandContext context, TSet
// If we got here the debug command was unsuccessful
logger.LogInformation($"Could not launch a debugger, waiting for manual attach");
}
logger.LogInformation($"Waiting for a debugger to attach to process {Process.GetCurrentProcess().Id} (or press a key to continue)...");

logger.LogInformation(
$"Waiting for a debugger to attach to process {Process.GetCurrentProcess().Id} (or press a key to continue)...");
while (!Debugger.IsAttached && !Console.KeyAvailable)
{
Thread.Sleep(100);
Expand Down
7 changes: 5 additions & 2 deletions src/core/Statiq.App/Commands/GlobEvalCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.VisualBasic;
using Spectre.Console.Cli;
Expand All @@ -14,7 +15,8 @@ namespace Statiq.App
[Description("Evaluates a globbing pattern against an existing path.")]
public class GlobEvalCommand : Command<GlobEvalCommandSettings>
{
public override int Execute(CommandContext context, GlobEvalCommandSettings settings)
public override int Execute(CommandContext context, GlobEvalCommandSettings settings,
CancellationToken cancellationToken = default)
{
// Make sure path is absolute
NormalizedPath path = new NormalizedPath(settings.Path);
Expand All @@ -27,7 +29,8 @@ public override int Execute(CommandContext context, GlobEvalCommandSettings sett
LocalFileProvider fileProvider = new LocalFileProvider(fileSystem);
fileSystem.FileProvider = fileProvider;
IDirectory directory = fileProvider.GetDirectory(path);
foreach (IFile match in (IEnumerable<IFile>)Globber.GetFiles(directory, new[] { settings.Pattern }).ToArray())
foreach (IFile match in (IEnumerable<IFile>)Globber.GetFiles(directory, new[] { settings.Pattern })
.ToArray())
{
Console.WriteLine(match.Path.FullPath);
}
Expand Down
6 changes: 3 additions & 3 deletions src/core/Statiq.App/Commands/GlobTestCommand.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using Spectre.Console.Cli;
using Statiq.Common;
using Statiq.Testing;
Expand All @@ -12,7 +11,8 @@ namespace Statiq.App
[Description("Tests a globbing pattern against a sample path.")]
public class GlobTestCommand : Command<GlobTestCommandSettings>
{
public override int Execute(CommandContext context, GlobTestCommandSettings settings)
public override int Execute(CommandContext context, GlobTestCommandSettings settings,
CancellationToken cancellationToken = default)
{
// Make sure path is absolute
NormalizedPath path = new NormalizedPath(settings.Path);
Expand Down
6 changes: 4 additions & 2 deletions src/core/Statiq.App/Commands/IConfiguratorExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Threading;
using Spectre.Console.Cli;
using Spectre.Console.Cli.Unsafe;
using Statiq.Common;
Expand Down Expand Up @@ -59,7 +60,8 @@ public static ICommandConfigurator AddPipelineCommand(
public static ICommandConfigurator AddDelegateCommand(
this IConfigurator configurator,
string name,
Func<CommandContext, int> func) =>
configurator.AddDelegate<EmptyCommandSettings>(name, (c, _) => func(c));
Func<CommandContext, int> func,
CancellationToken ct = default) =>
configurator.AddDelegate<EmptyCommandSettings>(name, (c, _, ct) => func(c));
}
}
5 changes: 2 additions & 3 deletions src/core/Statiq.App/Commands/PipelinesCommand{TSettings}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ protected override async Task<int> ExecuteEngineAsync(
SetPipelines(commandContext, commandSettings, engineManager);
using (CancellationTokenSource cancellationTokenSource = new CancellationTokenSource())
{
new ConsoleListener(() =>
new ConsoleListener(async () =>
{
cancellationTokenSource.Cancel();
return Task.CompletedTask;
await cancellationTokenSource.CancelAsync();
});
return (int)await engineManager.ExecuteAsync(cancellationTokenSource);
}
Expand Down
21 changes: 10 additions & 11 deletions src/core/Statiq.App/Statiq.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Configuration.Xml" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.1.18" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.10.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Xml" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.1" />
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="3.1.0" />
<PackageReference Include="NetEscapades.Extensions.Logging.RollingFile" Version="2.2.0" />
<PackageReference Include="Spectre.Console" Version="0.45.0" />
<PackageReference Include="Spectre.Console.Cli" Version="0.45.0" />
<PackageReference Include="NetEscapades.Extensions.Logging.RollingFile" Version="2.5.0" />
<PackageReference Include="Spectre.Console" Version="0.54.0" />
<PackageReference Include="Spectre.Console.Cli" Version="0.53.1" />
</ItemGroup>

<ItemGroup>
Expand Down
14 changes: 7 additions & 7 deletions src/core/Statiq.Common/Statiq.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<PackageTags>Statiq Static StaticContent StaticSite Blog BlogEngine</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AngleSharp" Version="0.16.1" />
<PackageReference Include="ConcurrentHashSet" Version="1.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="3.1.6" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.18" />
<PackageReference Include="AngleSharp" Version="1.4.0" />
<PackageReference Include="ConcurrentHashSet" Version="1.3.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.1" />
<PackageReference Include="NetFabric.Hyperlinq" Version="3.0.0-beta48" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/core/Statiq.Common/Util/ItemStreams/ItemStream{TItem}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@ public sealed override int Read(Span<byte> buffer)

public sealed override int WriteTimeout { get => base.WriteTimeout; set => base.WriteTimeout = value; }

public sealed override object InitializeLifetimeService() => base.InitializeLifetimeService();

public sealed override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) => base.BeginRead(buffer, offset, count, callback, state);

public sealed override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) => base.BeginWrite(buffer, offset, count, callback, state);
Expand Down
9 changes: 5 additions & 4 deletions src/core/Statiq.Core/Execution/IEngineExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Reflection;
using Microsoft.Extensions.Logging;
using Statiq.Common;
using Version = SemanticVersioning.Version;

namespace Statiq.Core
{
Expand All @@ -18,16 +19,16 @@ public static void LogAndCheckVersion(this IEngine engine, Assembly assembly, st
// Get and print the version
string informationalVersion = versionAttribute.InformationalVersion;
engine.Logger.LogInformation($"{name} version {informationalVersion}", true);
SemVer.Version version = new SemVer.Version(informationalVersion, true);
Version version = new Version(informationalVersion, true);

// Get all version ranges
(string Key, SemVer.Version Version)[] minimumVersions = engine.Settings.Keys
(string Key, Version Version)[] minimumVersions = engine.Settings.Keys
.Where(k => k.StartsWith(minimumVersionKey))
.Select(k => (Key: k, Value: engine.Settings.GetString(k)))
.Where(x => !x.Value.IsNullOrWhiteSpace())
.Select(x => (x.Key, new SemVer.Version(x.Value, true)))
.Select(x => (x.Key, new Version(x.Value, true)))
.ToArray();
foreach ((string Key, SemVer.Version Version) minimumVersion in minimumVersions)
foreach ((string Key, Version Version) minimumVersion in minimumVersions)
{
if (version < minimumVersion.Version)
{
Expand Down
12 changes: 6 additions & 6 deletions src/core/Statiq.Core/Execution/MemoryStreamFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ public class MemoryStreamFactory : IMemoryStreamFactory
private const int BlockSize = 16384;

private readonly RecyclableMemoryStreamManager _manager =
new RecyclableMemoryStreamManager(
BlockSize,
RecyclableMemoryStreamManager.DefaultLargeBufferMultiple,
RecyclableMemoryStreamManager.DefaultMaximumBufferSize)
new RecyclableMemoryStreamManager(new RecyclableMemoryStreamManager.Options
{
MaximumFreeSmallPoolBytes = BlockSize * 32768L * 2, // 1 GB
};
BlockSize = BlockSize,
LargeBufferMultiple = RecyclableMemoryStreamManager.DefaultLargeBufferMultiple,
MaximumBufferSize = RecyclableMemoryStreamManager.DefaultMaximumBufferSize,
MaximumLargePoolFreeBytes = BlockSize * 32768L * 2, // 1 GB
});

public virtual MemoryStream GetStream() => _manager.GetStream();

Expand Down
2 changes: 2 additions & 0 deletions src/core/Statiq.Core/Modules/Content/AddRtlSupport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ private static bool IsRightToLeft(int c)
c == 0x00FB3E;
}

#pragma warning disable CA1505 // Maintainability Index.
private static bool IsLeftToRight(int c)
{
// Generated from Table D.2 of RFC3454
Expand Down Expand Up @@ -506,5 +507,6 @@ private static bool IsLeftToRight(int c)
c == 0x01D4A2 || c == 0x01D4BB ||
c == 0x01D546;
}
#pragma warning restore CA1505 // Maintainability Index.
}
}
5 changes: 0 additions & 5 deletions src/core/Statiq.Core/Modules/IO/MirrorResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ public MirrorResources(Func<Uri, NormalizedPath> pathFunc)

protected override async Task<IEnumerable<Common.IDocument>> ExecuteContextAsync(IExecutionContext context)
{
#pragma warning disable RCS1163 // Unused parameter.
// Handle invalid HTTPS certificates and allow alternate security protocols (see http://stackoverflow.com/a/5670954/807064)
ServicePointManager.ServerCertificateValidationCallback = (s, cert, chain, ssl) => true;
#pragma warning restore RCS1163 // Unused parameter.

// Cache downloaded resources
Dictionary<string, string> mirrorCache = new Dictionary<string, string>();

Expand Down
19 changes: 9 additions & 10 deletions src/core/Statiq.Core/Statiq.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
<PackageTags>Statiq Static StaticContent StaticSite Blog BlogEngine</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JavaScriptEngineSwitcher.Core" Version="3.21.0" />
<PackageReference Include="JavaScriptEngineSwitcher.Jint" Version="3.21.2" />
<PackageReference Include="JavaScriptEngineSwitcher.Core" Version="3.24.1" />
<PackageReference Include="JavaScriptEngineSwitcher.Jint" Version="3.30.3" />
<PackageReference Include="JSPool" Version="2.0.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.18" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="1.2.2" />
<PackageReference Include="Polly" Version="7.1.1" />
<PackageReference Include="SemanticVersioning" Version="1.2.2" />
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.1" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageReference Include="Polly" Version="8.6.5" />
<PackageReference Include="SemanticVersioning" Version="3.0.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.3" />
<PackageReference Include="System.Linq.Async" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Statiq.Common\Statiq.Common.csproj" />
Expand Down
9 changes: 4 additions & 5 deletions src/core/Statiq.Testing/Statiq.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
<PackageTags>Statiq Static StaticContent StaticSite Blog BlogEngine</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.18" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.18" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="Shouldly" Version="4.0.3">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.1" />
<PackageReference Include="NUnit" Version="4.4.0" />
<PackageReference Include="Shouldly" Version="4.3.0">
<!-- See https://github.com/shouldly/shouldly/issues/795 -->
<ExcludeAssets>build</ExcludeAssets>
</PackageReference>
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Statiq.Common\Statiq.Common.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.Text;
using Microsoft.Extensions.Logging;
using Statiq.Common;

namespace Statiq.CodeAnalysis.Analysis
Expand Down Expand Up @@ -81,7 +80,9 @@ public AnalyzeSymbolVisitor(
// Get any reflected methods we need
Assembly workspacesAssembly = typeof(Workspace).Assembly;
Type reflectedType = workspacesAssembly.GetType("Microsoft.CodeAnalysis.Shared.Extensions.ITypeSymbolExtensions");
MethodInfo reflectedMethod = reflectedType.GetMethod("GetAccessibleMembersInThisAndBaseTypes");
MethodInfo reflectedMethod = reflectedType.GetRuntimeMethods().Single(m =>
m.Name.Equals("GetAccessibleMembersInThisAndBaseTypes") &&
m.GetParameters()[1].ParameterType == typeof(ISymbol));
_getAccessibleMembersInThisAndBaseTypes = reflectedMethod.MakeGenericMethod(typeof(ISymbol));

Assembly csharpAssembly = typeof(CSharpCompilation).Assembly;
Expand Down
Loading