jjchiw / gelf4net

GELF log4net Appender - graylog2
MIT License
63 stars 59 forks source link

Switch to new `.csproj` Format #61

Closed iwillspeak closed 6 years ago

iwillspeak commented 6 years ago

This PR moves the project format from the old .csproj to the new one. This allows building with $ dotnet build and packaging with $ dotnet pack. Version numbers are centralised in Build.Props files.

The advantage of the newer project format is that package and build information live in the same file. This prevents 'drift' between versions of dependencies that are built against and those specified in the .nuspec files. It also makes diffing and merging project files easier.

In this PR I've removed the duplicate projects for compiling the .NET Framework and .NET Standard packages. Instead a single project can be used to target both frameworks (via the <TargetFrameworks> attribute. This means that types are now compiled only into the assembly that they would be for the .NET Standard package. To maintain backwards compatibility types are forwarded from their old locations to their canonical locations. This should mean that no changes are needed to config files when upgrading to this build. It also has the side effect of meaning that configuration that targets the .NET Framework package will 'just work' with the .NET Standard build too.

The outstanding features so far are ILMerge support and updating the Cake build file to support building the new format.

jjchiw commented 6 years ago

Great :)

I'll merge and test during the weekend and will update the nuget package

Thanks

iwillspeak commented 6 years ago

I have another PR based on this to improve the Async appenders, and add an Async HTTP appender too. I'll see if I can fix up the CI build for this today.

iwillspeak commented 6 years ago

Are you happy with this as-is or would you like me to squash to a single commit?

jjchiw commented 6 years ago

Hi

It's ok, with all the commits, no problemo :)

It looks great with the new csproj format, less cluttered, less projects, much much better...

Also the TypeForwardedTo is very neat! I didn't heard of that before :(

About the ILMerge let's hope the users do not complain.... if they do, I'll tweak the cake script or msbuild (https://github.com/microsoft/ilmerge)

Thank you very much for the contribution.....

iwillspeak commented 6 years ago

Thanks for this! Got another PR (#62 ) open now which adds an Async version of the HTTP appender. Still not finished, but open for input.