russcam / asciidocnet

AsciiDoc Processor for .NET
Apache License 2.0
39 stars 9 forks source link

Porting asciidocnet to .net core #6

Closed dmetzgar closed 7 years ago

dmetzgar commented 8 years ago

The majority of the changes are in the test code. The source binary only needs a few tweaks for string comparisons and opening file streams. Other than that I removed the sln, csproj, and assemblyinfo.cs files. This is more of a personal preference for working with the .NET CLI as these files are not needed. But if you prefer using Visual Studio, these should remain. The good news is that if you make the few changes to the library and add the project.json, AsciiDocNet will support .NET Core.

For the test code changes, I converted the NUnit tests to xUnit. I also dropped the SpecFlow stuff. NUnit is not supported on .NET Core yet and I prefer xUnit anyways. SpecFlow is also not supported. If you're trying to target both Framework and Core, you could make the SpecFlow portions conditional.

My port is not meant for both .NET Framework and .NET Core. I was targeting AsciiDocNet for the .NET Standard Library and the tests to run in .NET Core. This was mostly an exercise for me, but it may help you with porting to .NET Core.

russcam commented 7 years ago

I pulled in the changes for .NET core and xunit and also ported the library over to using Paket and FAKE.

I reinstated the .csproj based solution and introduced the .xproj project files in order to run both side by side. Once I've moved over to VS2017, I'll look to update this again and embrace .NET Core properly; I should probably also purchase a copy of your book to help me 😃

Thanks again for submitting @dmetzgar 👍