@Michael Taylor
, no I didnt copy that from my script. Actually after set command, I have used echo to display whether that MSBuildExtensionsPath variable is set to expected path or not. And I see that its value is set to the path I gave. But even though, its value is set to the given path initially, when msbuild.exe is invoked in the makefile to build the projects, then when i see the build log file, msbuild.exe is considering the default path only . I want to know why this is happening with msbuild.exe from VS2019 installation path.
Most likely because it is getting initialized by the toolset. Report the issue in Github so the dev team can look at it and tell you whether it is by design or not. There have been fixes to the behavior of these sets of variables over the years and it might or might not be by design. The other thing that comes to my mind is whether it is an issue with x86 vs x64 versions of msbuild. But the dev team can answer that better.