Trying to use a C++ dll, getting System.TypeLoadException

Trying to use a C++ dll… getting the following error:

Unhandled Exception: System.TypeLoadException: Could not load type ‘System.Runtime.Versioning.TargetFrameworkAttribute’ from assembly ‘AgilityInputCSharp’.

Is there an issue with how the dll is being created? A project setting??

Looks like the problem was solved by compiling the dll in Release instead of Debug.