In my case, the issue occurred after manually migrating a WPF application (still based on .NET framework 4.6) to the new "SDK style" project format. I used a combination of the proposed solutions in this thread for performing the migration.
In my case, the issue occurred after manually migrating a WPF application (still based on .NET framework 4.6) to the new "SDK style" project format. I used a combination of the proposed solutions in this thread for performing the migration.