zanaptak / BinaryToTextEncoding

A binary-to-text encoder/decoder library for .NET and Fable. Provides base 16, base 32, base 46, base 64, and base 91 codecs. Supports custom character sets.
MIT License
9 stars 0 forks source link

support for net8? #3

Open Dexus opened 3 weeks ago

Dexus commented 3 weeks ago

Hi would it be possible to make it net8 compatible?

zanaptak commented 2 weeks ago

Can you provide more information on the problem? The library targets netstandard2.0 which is supported by .NET 8 so it should work fine.

Dexus commented 2 weeks ago

hi @zanaptak its not because i try to create a webassembly that targets net8 only, and when I add the package, its not working.

zanaptak commented 2 weeks ago

I've tried it using the Visual Studio 2022 Blazor project templates and it is working for me.

For instance it works with the following .csproj targeting net8.0 and referencing the library:

<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
    <StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.8" />
    <PackageReference Include="Zanaptak.BinaryToTextEncoding" Version="1.1.0" />
  </ItemGroup>

</Project>

and I am able to call it successfully in the code with e.g. Zanaptak.BinaryToTextEncoding.Base16.Default.Encode(new byte[] { 127, 128, 129 }) (returns 7F8081).

So I don't really know what could be the issue. Can you provide an example project in a temp repository that reproduces the issue?

Dexus commented 1 week ago

I'm running now a repair maybe something got broken. Will check this later. But I only use Sdk="Microsoft.NET.Sdk" if I'm not wrong right now without access to my pc.