your project does not reference .netframework version=v4.7.2 code example
Example: your project does not reference .netframework version=v4.7.2
Clean solution
Clean folder "packages"
Delete folder "bin"
Delete folder "obj"
Clean solution
Clean folder "packages"
Delete folder "bin"
Delete folder "obj"