Ben D
Ben D

Reputation: 811

Running Visual Studio commands from Powershell

I am currently very new to powershell and am trying to think of various way this tool can help me as a .net developer. It seems clear that powershell can help me automate mundane tasks, which lead me to think, for example, can I use powershell to run a build in visual studio in release mode?

In summary, I am looking for a series of commands that allow me to run visual studio functionality from powershell

Thanks and I do hope this is not a stupid question?!?

Upvotes: 0

Views: 114

Answers (1)

majkinetor
majkinetor

Reputation: 9026

To replicate VS functionality like build, test team projects etc. you need to know adequate command for it or use specific modules. The question is to broad but here are some starters:

  • msbuild builds your solution
  • mstest.exe runs your tests
  • migrate.exe runs Entity Framework database migrations
  • for TFS you could use its clients directly or REST interface.
  • nuget.exe to manage dependencies

You can drive those from powershell, I usually have powershell all around it (pre/post build script, build, deploy...) This is much better in latest x-platform dotNet if you can use it, as it doesn't depend on IDE, basically everything is done from console.

Upvotes: 1

Related Questions