Skip to content

Conversation

waf
Copy link
Contributor

@waf waf commented May 27, 2017

This PR updates the nuspec file so the NuGet package includes the .NET Core DLL. The NuGet package has the following structure to support both .NET 3.5 and up, as well as .NET Core:

lib
├── net35
│   └── Antlr4.Runtime.Standard.dll
└── netstandard
    └── Antlr4.Runtime.Core.dll

I've verified that when the NuGet package is installed in .NET Framework projects ("normal" .NET), it references Antlr4.Runtime.Standard.dll, and in .NET Core projects it references Antlr4.Runtime.Core.dll.

For the build process, ideally to do a cross-platform build we could use a multi-targeting build with dotnet, the new command-line tool from Microsoft. However, due to dotnet/msbuild#1333 (a bug with msbuild core) we need to continue using mono to build .NET3.5, and dotnet to build .NET core. I've included a script that makes this easier, and updated the documentation.

Please see the conversation from #1229 (comment) for more context. /cc @ericvergnaud

waf added 3 commits May 26, 2017 23:12
as part of this, add OutputPath to the csproj so it matches the mono csproj OutputPath
@ericvergnaud
Copy link
Contributor

Hey,
this looks great!
Thanks

@parrt parrt added this to the 4.7.1 milestone May 27, 2017
@parrt parrt merged commit d0eaf29 into antlr:master May 27, 2017
@ericvergnaud
Copy link
Contributor

ericvergnaud commented May 28, 2017 via email

@waf
Copy link
Contributor Author

waf commented May 28, 2017

I have a project that targets both the .NET framework and .NET Core. I upgraded both those projects to 4.7.1, and both worked great! Thank you for packaging it so quickly.

One small thing I noticed is that both DLLs are stamped with the "4.7.0.0", even though the NuGet package is is 4.7.1:

image

However, this doesn't appear to have any negative effect. Thanks again!

@ericvergnaud
Copy link
Contributor

ericvergnaud commented May 28, 2017 via email

@waf waf deleted the dotnetcore-nuget-packaging branch May 28, 2017 13:41
@parrt
Copy link
Member

parrt commented May 28, 2017

Hmm...i haven't released 4.7.1 antlr yet so won't 4.7.1 version confuse things?

@ericvergnaud
Copy link
Contributor

ericvergnaud commented May 28, 2017 via email

@parrt
Copy link
Member

parrt commented May 28, 2017

no problem but why release 4.7.1 now? is that only way to test it via nuget?

@ericvergnaud
Copy link
Contributor

ericvergnaud commented May 28, 2017 via email

@KvanTTT
Copy link
Member

KvanTTT commented May 28, 2017

You could name it as 4.7.0.1 instead of 4.7.1. Antlr version incremented at the third number as usual.

@ericvergnaud
Copy link
Contributor

@waf
@xied75
Hi, NetCore builds is now failing on Travis CI with error: JAVA_HOME is not defined correctly
Could you have a look?

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

Successfully merging this pull request may close these issues.

5 participants