Following your book, I get this error MSB8040.
Error MSB8040: Spectre-mitigated libraries are required for this project.
I think I know what to do but haven't resolved it yet. Sharing in case I don't resolve and if I do I'll update with steps on what I did to fix it.
You need to go to VS setup, search "Spectre" in individual components, and install the libraries with Spectre mitigations.
I tried that by doing the latest ones but that wasn't enough. I even tried making sure to get ARM and ARM 64 as well as x86 and x64. Aside from installing all of them I wasn't sure which I need so I found out I can disable the feature for now via the properties and that seemed to do the trick.
That's another option :)