After playing around with the dotnet upgrade assistant(see this previous post) I did an undo of the changes that were made by the tool through source control. However after doing that my code refused to compile.
Here is the error message I got:
Your project does not reference ".NETFramework,Version=v4.6.2" framework. Add a reference to ".NETFramework,Version=v4.6.2" in the "TargetFrameworks" property of your project file and then re-run NuGet restore.
When I took a look at my project settings, I didn’t see something wrong…
I tried a ‘Clean Solution’, didn’t help…
I deleted the bin folder and did a ‘Rebuild’ of the solution, didn’t help either…
In the end what did the trick was to remove the obj folder for every project. Once the folder was removed, the error disappeared when I recompiled the application.
Strange!