diff --git a/src/BenchmarkDotNet/Running/BenchmarkRunnerDirty.cs b/src/BenchmarkDotNet/Running/BenchmarkRunnerDirty.cs
index f353261111..e7781b23a2 100644
--- a/src/BenchmarkDotNet/Running/BenchmarkRunnerDirty.cs
+++ b/src/BenchmarkDotNet/Running/BenchmarkRunnerDirty.cs
@@ -66,22 +66,18 @@ public static Summary[] Run(BenchmarkRunInfo[] benchmarkRunInfos)
return RunWithExceptionHandling(() => RunWithDirtyAssemblyResolveHelper(benchmarkRunInfos));
}
- ///
- /// Supported only on Full .NET Framework. Not recommended.
- ///
[PublicAPI]
[EditorBrowsable(EditorBrowsableState.Never)]
+ [Obsolete("This method will be removed soon as it is not supported in .NET Core")]
public static Summary RunUrl(string url, IConfig config = null)
{
using (DirtyAssemblyResolveHelper.Create())
return RunWithExceptionHandling(() => RunUrlWithDirtyAssemblyResolveHelper(url, config));
}
- ///
- /// Supported only on Full .NET Framework. Not recommended.
- ///
[PublicAPI]
[EditorBrowsable(EditorBrowsableState.Never)]
+ [Obsolete("This method will be removed soon as it is not supported in .NET Core")]
public static Summary RunSource(string source, IConfig config = null)
{
using (DirtyAssemblyResolveHelper.Create())
@@ -115,6 +111,7 @@ private static Summary[] RunWithDirtyAssemblyResolveHelper(Type[] types, IConfig
private static Summary[] RunWithDirtyAssemblyResolveHelper(BenchmarkRunInfo[] benchmarkRunInfos)
=> BenchmarkRunnerClean.Run(benchmarkRunInfos);
+#pragma warning disable CS0618 // Use of obsolete symbol
[MethodImpl(MethodImplOptions.NoInlining)]
private static Summary RunUrlWithDirtyAssemblyResolveHelper(string url, IConfig config = null)
=> RuntimeInformation.IsFullFramework
@@ -126,6 +123,7 @@ private static Summary RunSourceWithDirtyAssemblyResolveHelper(string source, IC
=> RuntimeInformation.IsFullFramework
? BenchmarkRunnerClean.Run(BenchmarkConverter.SourceToBenchmarks(source, config)).Single()
: throw new InvalidBenchmarkDeclarationException("Supported only on Full .NET Framework");
+#pragma warning restore CS0618 // Use of obsolete symbol
private static Summary RunWithExceptionHandling(Func run)
{
diff --git a/src/BenchmarkDotNet/Running/ClassicBenchmarkConverter.cs b/src/BenchmarkDotNet/Running/ClassicBenchmarkConverter.cs
index 15e01156da..4fd193baa8 100644
--- a/src/BenchmarkDotNet/Running/ClassicBenchmarkConverter.cs
+++ b/src/BenchmarkDotNet/Running/ClassicBenchmarkConverter.cs
@@ -1,6 +1,7 @@
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
+using System.ComponentModel;
using System.IO;
using System.Linq;
#if NET6_0_OR_GREATER
@@ -22,6 +23,8 @@ public static partial class BenchmarkConverter
private static readonly HttpClient Client = new HttpClient();
#endif
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ [Obsolete("This method will be removed soon as it is not supported in .NET Core")]
public static BenchmarkRunInfo[] UrlToBenchmarks(string url, IConfig config = null)
{
if (!RuntimeInformation.IsFullFramework)
@@ -65,6 +68,8 @@ public static BenchmarkRunInfo[] UrlToBenchmarks(string url, IConfig config = nu
return SourceToBenchmarks(benchmarkContent, config);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ [Obsolete("This method will be removed soon as it is not supported in .NET Core")]
public static BenchmarkRunInfo[] SourceToBenchmarks(string source, IConfig config = null)
{
if (!RuntimeInformation.IsFullFramework)