Oh, and according to the Revit 2017 API docs:
"Revit's binaries are built using .NET 4.5.2. However, Revit uses the runtime from .NET 4.6. At a minimum, add-ons will need to target .NET 4.5.2, but .NET 4.6 will also work."
Try 4.6 and see if that helps.