ionide / KeepAChangelog

Parser and MSBuild Targets for using Keep-A-Changelog-formatted Changelogs in your Build
MIT License
30 stars 4 forks source link

Add multitargeting support #6

Closed baronfel closed 2 years ago

baronfel commented 2 years ago

While updating Fantomas, I discovered that Fantomas' global tool didn't work with these targets. The tool is multitargeted to two TFMs, and while the inner single-TFM builds were being versioned correctly, the outer build (which was mostly just calling Pack) didn't have the same target setup and so the targets from this package weren't being registered.

The fix for this is to put multitargeting-specific targets in the buildMultiTargeting folder of the package. Since all that's happening at the outer-build level is a Pack, the appropriate time to parse and set the version-specific parameters is at the GenerateNuspec target, which is what I've done here.

baronfel commented 2 years ago

I tested this locally by munging the targets for my installed 0.1.1 version of this package while iterating on Fantomas' packaging.