remove Microsoft.Extensions.DependencyInjection.Abstractions dependency
MODIFY
src/Directory.Build.props
src/Directory.Build.props
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
- <Version>5.0.2</Version>
+ <Version>6.0.0</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<PackageTags>Clipboard, Copy</PackageTags>
<Description>A cross platform package to copy text to the clipboard.</Description>

MODIFY
src/TextCopy/ClipboardService.cs
src/TextCopy/ClipboardService.cs
@@ -36,7 +36,7 @@ public static partial class ClipboardService
#if NET6_0
if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("Browser")))
{
- throw new($"The static class ClipboardService is not supported on Blazor. Instead inject an {nameof(IClipboard)} using {nameof(ServiceExtensions)}{nameof(ServiceExtensions.InjectClipboard)}.");
+ throw new($"The static class ClipboardService is not supported on Blazor. Instead inject an {nameof(IClipboard)} using services.AddSingleton<IClipboard>(_ => new BlazorClipboard(_.GetRequiredService<IJSRuntime>()))");
}
#endif
getAsyncFunc = CreateAsyncGet();

MODIFY
src/TextCopy/TextCopy.csproj
src/TextCopy/TextCopy.csproj
<PackageReference Include="Fody" Version="6.6.0" PrivateAssets="all" />
<PackageReference Include="ProjectDefaults" Version="1.0.63" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" Condition="$(Configuration) == 'Release'" />
- <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0"/>
</ItemGroup>
</Project>
\ No newline at end of file

remove Microsoft.Extensions.DependencyInjection.Abstractions dependency