This problem was fixed when I again followed the recommendation in this article:
https://dnntracker.atlassian.net/browse/DNN-6912
and followed Scott Wilkenson's advice to update the .NET Framework to 4.5.1 or higher in the project settings.
I basically downloaded the DNN code from github: https://github.com/dnnsoftware/Dnn.Platform, then recompiled the new Dnn website (under Dnn.PlatformDevelopment/Website), and then made sure to delete the existing DotNetNuke dll's and then add the new DotNetNuke dll's from the website bin folder into my project, and then it worked.