Skip to content

更新到1.4.3,SvgQRCode没有了 #469

Closed

Description

@xtxk110

运行环境更新到NET7,升级Qrcoder到1.4.3,SvgQRCode没有了。有没有相关替代的类或实现方法

Activity

  1. doggy8088 commented on Aug 29, 2023

    @doggy8088

    有的,請直接將 TargetFramework 從 net7.0 修改為 net7.0-windows 即可使用。

    <Project Sdk="Microsoft.NET.Sdk">
    
      <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>net7.0-windows</TargetFramework>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
      </PropertyGroup>
    
      <ItemGroup>
        <PackageReference Include="QRCoder" Version="1.4.3" />
      </ItemGroup>
    
    </Project>

    唯一的缺點就是無法跨平台,僅能支持 Windows 平台。

  2. koaqiu commented on Oct 6, 2023

    @koaqiu
    Contributor

    你可以把源代码中的SvgQrCode.cs 复制到你的项目中
    删除 SvgLogo 相关代码,然后再修改第一行的条件编译(或者直接删除),这样就能在net6 或者net7 运行了。
    如果需要Logo支持的话,你需要用 自己重写一下 处理位图的相关代码。

  3. Shane32 commented on Apr 21, 2024

    @Shane32
    Owner

    In English, the original issue was:

    Updated the runtime environment to .NET 7, upgraded Qrcoder to version 1.4.3, SvgQRCode is no longer available. Are there any alternative classes or implementation methods?

    This has been solved by:

  4. codebude commented on Apr 21, 2024

    @codebude
    Collaborator

    Fixed with #490. Will be part of QRCoder 1.5.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions