2
votes

When I try to install HtmlSanitizer with Manage Nuget Packages I get this error message: Could not install package 'HtmlSanitizer 3.2.105'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', 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. What should I do?

2
Do you have a hard requirement for your app to target .NET 4.0?oldbam

2 Answers

0
votes

I tried it on my machine on VS15 and got same message. I think you should let the author of the package know about the issue.

You could try the earlier version. The latest one, I was able to install, was 2.0.5735.24296.

0
votes
  • The latest stable of HtmlSanitizer is indeed .NET 4.5 only (see screenshot) (3.2.105)
  • The beta "3.3.132-beta" supports also netstandard 1.3 (but that isn't .NET 4)
  • The dependency (AngleSharp) does support .NET 4.
  • Version 2.0.5735.24296 support .NET 4
  • I have created a GitHub issue