adamralph/liteguard

LiteGuard.Source 2.0.0+ not compatible with Net45 (Net Standard 1.0)

Closed this issue · 4 comments

Version(s)

LiteGuard.Source 2.0.0+

To reproduce

Steps to reproduce the behavior:

  1. Create new Class Library project, Net45, VS2019
  2. Add LiteGuard.Source <=1.1.0 - works
  3. Upgrade LiteGuard.Source to 2.0.0 or above => Could not install package 'LiteGuard.Source 2.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Expected behavior

Supported platforms: .NET Standard 1.0 onwards.

Actual behaviour

Could not install package 'LiteGuard.Source 2.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Workarounds

Using 1.1.0 won't kill me! Maybe there's a note somewhere but I can't find it and NuGet package claims 1.0 onwards.

@9swampy thanks for raising this. I just followed your repro steps and it all worked perfectly. No errors or warnings.

All versions of both LiteGuard packages (LiteGuard and LiteGuard.Source) support netstandard1.0, so there is no reason your scenario should not work.

Odd, I've tried on a different box, VS2019 16.7.1, new Project, class lib Net4.5 (not 4.5.1 - that works actually nothing above net4.5 is working for us) and Net4 installed on box is 4.8.03761. Same issue. No worries though, happy to close if you can't reproduce; isn't killing me.

Just for giggles tried on VS2017 15.9.20 and it works fine. Looking like it's VS not the package...

Yes, it does sound like a VS issue, or possibly some combination of VS and the .NET Framework version(s) available on the machine.

FTR, I'm using VS 16.7.2 and everything works fine. I have several versions of the .NET Framework SDK on the machine from 4.5 to 4.7.2, but not 4.8.

I'll close this now as it does seem to be a problem outside LiteGuard, but if you find anything to the contrary, please feel free to re-open.

Incidentally, if you manage to narrow down the problem, I'd be interested to know what it is. It could even go into an FAQ for the package.

Thanks again for raising this.