Skip to content

Provide .NET Framework target in the csharp nuget package #3212

Closed

Description

@appel1

Currently the Antlr4.Runtime.Standard NuGet package only contains a netstandard 2.0 build. If you consume such a package targeting .NET Framework prior to 4.7.2 it adds additional dependencies that causes us some issues. Instead of working around those it would be easier if the C# runtime package included a .NET Framework 4.6.2 target.

<TargetFrameworks>net462;netstandard2.0</TargetFrameworks>

We cannot upgrade to 4.7.2 or newer right now due to outside constraints for some of our projects.

Activity

  1. KvanTTT commented on Jul 1, 2021

    @KvanTTT
    Member

    What issues? According to the table netstandard2.0 is compatible with .NET Framework >= 4.6.1.

  2. appel1 commented on Jul 1, 2021

    @appel1
    ContributorAuthor

    It also says

    2 The versions listed here represent the rules that NuGet uses to determine whether a given .NET Standard library is applicable. While NuGet considers .NET Framework 4.6.1 as supporting .NET Standard 1.5 through 2.0, there are several issues with consuming .NET Standard libraries that were built for those versions from .NET Framework 4.6.1 projects. For .NET Framework projects that need to use such libraries, we recommend that you upgrade the project to target .NET Framework 4.7.2 or higher.

    What happens is that it pulls in additional dependencies, like System.Runtime.InteropServices.RuntimeInformation, that needs to be deployed and so on. And perhaps there are additional issues that are not as apparent that causes tricky to resolve issues on client machines. The documentation doesn't say what issues it causes so I'd rather avoid that unknown if I can.

  3. KvanTTT commented on Jul 1, 2021

    @KvanTTT
    Member

    In this case, maybe it makes sense to use a minimal compatible .NET Framework version, 4.5 or 4.6.1?

  4. appel1 commented on Jul 1, 2021

    @appel1
    ContributorAuthor

    I'm fine with either. It compiles for .net 4.5 so I guess it makes sense to go for that.

  5. added this to the 4.9.3 milestone on Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions