buildxsdwindows-10commandcruisecontrol.net

'xsd' is not recognized as an internal or external command


Our cruise control has been having a build failure due to:

'xsd' is not recognized as an internal or external command

C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(5809,5): error MSB3073: The command "xsd R:\path\path\filename.xsd /c /o:R:path\path\ /n:filename" exited with code 9009.

I checked the environment path variable and see this is there (typed set at command prompt and saw this in list): C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools; and xsd.exe exists in the NETFX 4.8 Tools dir.

I'm not sure why an update of code would make the xsd command stop working for us or what's wrong with it. I looked at R and the file path exists as well.

I tried rebooting the build machine and it's still having that error.

Any idea what is needed to fix this? Our nightly builds away from cruise control work fine (different build machine).

I looked at xsd not working and I appear to be doing what they did but mine doesn't work. Any help would be appreciated!

Update: I opened advanced environment variables and netfx 4.8 tools is not in user variables for path like they discuss under advanced setup in the link above. Is that what I need? I don't see that defined in the other advanced variable list there either so I'm trying to add it to system variables first.

Update2: The build was fine in cruise with the system variable, but we don't have it in our nightly build location like that so I had to remove it. It turned out the change made in September that broke our cruise build was using a bat file to build, and I had to look at the differences and add them to the ccnet.config file for cruise, then force a build in the CCTray. We shall see if that fixes it.


Solution

  • I found out that we have a bat file used by the nightly build, but cruise uses our config file. There were a couple projects added to the nightly build bat file and I had to add those to the cruise config file. That fixed it finally! That's with removing the bandaid of adding the NETFX 4.8 Tools to the system path variable (that fixed it alone too, but was not the intended fix for the team).