MSBuildExtensionsPath of VS2019 is not getting overrided when tried to override its path using "set"

sunayana Jinka 1 Reputation point
2021-09-16T11:29:54.127+00:00

I tried to override the $(MSBuildExtensionsPath) property of VS2019 using "Set MSBuildExtentionsPath="C:\ProgramFiles(x86)\MyCustomTargetsPath" ". But when projects are built with msbuild.exe from VS2019 installation path(C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin), then MSBuildExtensionsPath is pointing to default path instead of the overrided value which is not desired. But when projects are built with msbuild.exe from "C:\Windows\Microsoft.NET\Framework\v4.0.30319", then MSBuildExtensionsPath is pointing to overrided path which s desired one. So please resolve the issue with MSBuild.exe from "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,979 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 49,781 Reputation points
    2021-09-16T12:45:41.42+00:00

    First I'll point out that your set command misspells the envvar name. So if you copied this from your script then you should fix your script and try again.

    For issues related to MSBuild you should report them in Github where the dev team can look at the issue and either help you get it working or identify it as a bug to be resolved.

    0 comments No comments

  2. sunayana Jinka 1 Reputation point
    2021-09-17T10:14:56.827+00:00

    @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.