'I cannot build my code in VS code. A error keeps showing in the terminal

My vs code was running all good until 3days whenever I build a code there was a error showing in the terminal which says "msbuild : The term 'msbuild' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • msbuild /property:GenerateFullPaths=true /t:build /consoleloggerparam ...
  •   + CategoryInfo          : ObjectNotFound: (msbuild:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException"
    
    

I have checked this error in stackoverflow previously and tried to check the path and reinstalling vs code (according to the answers given) but it didn't helped me. If anyone knows how to fix this pls help me .



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source