Roger Lipscombe
Roger Lipscombe

Reputation: 91965

Can I get Visual Studio to invoke MSBuild.exe for builds?

When you trigger a build in Visual Studio, it uses the MSBuild libraries to run the build. However, if the build hangs (and sometimes it does) this means that I have to kill devenv.exe.

Is there any way to get Visual Studio to invoke MSBuild.exe (so that I can kill that), instead of using MSBuild programmatically?

Upvotes: 0

Views: 490

Answers (1)

Marcos Brigante
Marcos Brigante

Reputation: 1000

It is not common for a build to hang. IMHO you should check that before trying to bypass the problem. Anyway, you could use MSBuild as an external tool:

Tools -> External Tools -> Add

Fill the form with these values:

  • Title - MSBuild
  • Command - C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
  • Arguments - $(SolutionName)
  • Initial Directory - $(SolutionDir)

Check "Use Output Window".

Then you can invoke the command in the "Tools" menu.

Upvotes: 3

Related Questions