MSBUILD : error MSB1001: Unknown switch. Switch: /restore

IT Support Forum Forums Development C# Development IDEs MSBUILD : error MSB1001: Unknown switch. Switch: /restore

Tagged: ,

Viewing 0 reply threads
  • Author
    Posts
    • #2496
      Webmaster
      Keymaster

      When running msbuild /restore, you may get this error:

      MSBUILD : error MSB1001: Unknown switch. Switch: /restore

      This is most likely because you are trying to use a switch that isn’t available with the version of msbuild you are running. In my case, I was required to use the msbuild /t:restore command instead. While this worked, I decided to update to the latest version of msbuild that shipped with my Visual Studio version, so the /restore switch was no longer unknown to msbuild. I did this by running the Visual Studio installer (a program that was already installed on my computer and will likely be on yours if you’re running msbuild), then clicking the Update button.

Viewing 0 reply threads
  • You must be logged in to reply to this topic.