Kryptos-FR / markdig.wpf

A WPF library for xoofx/markdig https://github.com/xoofx/markdig
MIT License
160 stars 52 forks source link

Add net40 support and switch to new csproj file for nuget generation #21

Closed ThomasPrioul closed 5 years ago

ThomasPrioul commented 5 years ago

Modified the source to handle net40 scenario, because markdig itself supports this. The project uses the new csproj format which generates the nuspec and generates the nuget package easily. Two outputs : net40 and net45, with inline optimizations disabled for net40 (because it doesn't support it).

Kryptos-FR commented 5 years ago

I'm not against using .Net 4.0, but know that WPF is broken in that version and is highly discouraged for new projects. Using the new format is a good suggestion anyway.

I'll review that more in-depth on the weekend. Thanks.

ThomasPrioul commented 5 years ago

I just wanted to use the library and found out it didn't work with net40 after trying to install it. The package didn't specify a net452 dependency that shows up in the NuGet GUI in VS. I think the new csproj format handles that on its own and clearly shows the package works for both net40 and net45 when you look at it in the list in VS. I saw markdig itself was compatible so I thought the change would be small and indeed the patches are easy to do. I'm using VS2019 so it replaced some "var" declarations for explicit declarations for built-in types like int, string, char... you can remove that if you don't like it.

I know WPF has been improved and patched since 2010, but there are some folks who still have to make nice looking programs for Windows XP machines in 2019 😅, and this was a nice opportunity to add Markdown to my app

Kryptos-FR commented 5 years ago

XP is deprecated and not supported anymore by Microsoft which makes it an easy target for hacker/spammer etc.

I'm conflicted because I find it unethical to support a platform that is a security risk.

That said, since it doesn't add any maintenance burden to support 4.0, I will probably do it. But I'll add a warning in the README that support will be limited and specific bugs unlikely to be fixed (in case there are any).

Kryptos-FR commented 5 years ago

I have switched all projects to the new csproj format. I'll continue investigating whether I should also support net40.

Kryptos-FR commented 5 years ago

Since csproj format and net40 are now supported in 0.2.8, I'm closing this PR.

Thanks for making the suggestion.