bradymholt / cron-expression-descriptor

A .NET library that converts cron expressions into human readable descriptions.
https://bradymholt.github.io/cron-expression-descriptor/
MIT License
1.01k stars 188 forks source link

Can't make CronExpressionDescriptor 2.x work in a net 4.6.1 project #142

Closed genemars closed 4 years ago

genemars commented 4 years ago

I tried to install CronExpressionDescriptor v 2.x nuget package in a project that targets .net framework 4.6.1, but then my project wouldn't build anymore.

Service\Handlers\Automation.cs(171,25): error CS0012: The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [C:\projects\homegenie\HomeGenie\HomeGenie.csproj]
Service\Handlers\Automation.cs(171,25): error CS0012: The type 'System.Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. [C:\projects\homegenie\HomeGenie\HomeGenie.csproj]

I had to revert back to version 1.21.2 in order to make it work. Is there a way to make latest CronExpressionDescriptor work in a net461 project?

genemars commented 4 years ago

sorry I just read the notes about .net support. But then I wonder if version 2.x has some improvements or fixes vs 1.21.1.