Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
appel1 opened this issue Jul 1, 2021 · 4 comments · Fixed by #3213
Closed

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

appel1 opened this issue Jul 1, 2021 · 4 comments · Fixed by #3213
Milestone

Comments

@appel1
Copy link
Contributor

appel1 commented Jul 1, 2021

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.

@KvanTTT
Copy link
Member

KvanTTT commented Jul 1, 2021

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

@appel1
Copy link
Contributor Author

appel1 commented Jul 1, 2021

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.

@KvanTTT
Copy link
Member

KvanTTT commented Jul 1, 2021

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

@appel1
Copy link
Contributor Author

appel1 commented Jul 1, 2021

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

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

Successfully merging a pull request may close this issue.

3 participants