I know that there are plenty of helps, where the Microsoft.WebSite.Publishing.targets file can be found statically for VS2017 or 2019 (e.g). I have a build script a
Microsoft.WebSite.Publishing.targets