As Dave said, it's not as simple as changing the target framework and adding the
UseWpf
item; the project format has changed quite significantly.
Undo your changes, and use the
CsprojToVs2017[
^] command-line tool to update your project file to the newer format.