dezhidki / Tommy

A single-file TOML reader and writer for C#
MIT License
212 stars 16 forks source link

Add support for overriding target frameworks. #27

Closed gibbed closed 3 years ago

gibbed commented 3 years ago

This allows override the TargetFrameworks that Tommy uses, if you include the project itself in your solution, via adding something like this to a parent directory's Directory.Build.props:

<Project>
  <PropertyGroup>
    <Tommy_TargetFrameworksToBuild>net48</Tommy_TargetFrameworksToBuild>
    <TommyExtensions_TargetFrameworksToBuild>net48</TommyExtensions_TargetFrameworksToBuild>
    <TommyExtensionsConfiguration_TargetFrameworksToBuild>net48</TommyExtensionsConfiguration_TargetFrameworksToBuild>
  </PropertyGroup>
</Project>

For the main project, it will try:

Otherwise defaults to the original TargetFrameworks.

For the extensions projects, it will try:

Otherwise defaults to the original TargetFrameworks.

dezhidki commented 3 years ago

Seems fine by me, thanks!