antlr4 icon indicating copy to clipboard operation
antlr4 copied to clipboard

net45 assembly missing from Antlr4.Runtime.Standard 4.10.1 nuget package

Open appel1 opened this issue 2 years ago • 3 comments

This causes build errors in our projects that target .NET 4.6.2.

Looking at https://github.com/antlr/antlr4/blob/master/runtime/CSharp/src/Antlr4.csproj it looks like a net45 target is built and included as long as you build on Windows. Was the nuget package built on a non-Windows machine by mistake?

appel1 avatar May 04 '22 10:05 appel1

Please elaborate or suggest a pull request. ANTLR is compatible with non-Windows machines. net45 for Windows was added for better compatibility with .NET Framework: https://github.com/antlr/antlr4/issues/3212

KvanTTT avatar May 04 '22 10:05 KvanTTT

The published nuget package does not contain net45 binaries. image

Possibly because if the nuget package is built on a non-windows machine only the netstandard2.0 target is built. image

Not sure how to fix this. Perhaps by failing the build completely if not done on Windows?

appel1 avatar May 04 '22 10:05 appel1

Got it. It looks like C# runtime should always build on Windows machines.

KvanTTT avatar May 04 '22 10:05 KvanTTT