views:

452

answers:

7

Spending most of my time in Visual Studio and using all the IDE tools. I wish I could spend more time using either of the following.

*the Command Window in VS
*cmd
*cygwin, minGW...
*PowerShell.
*scripts?

What are your favorite and essential commands to type in, opposed to keyboard shortcuts or clicking around?

+3  A: 

NAnt and booi are the biggest ones for me. NAnt provides building, booi provides a simple way of running .NET code.

Cody Brocious
could you provide a link to more info about booi (it apparently is not a google friendly name)
Glennular
The Boo interactive interpreter: http://boo.codehaus.org/Interactive+InterpreterI use IronPython for much the same thing
orip
+1  A: 

When creating very small single file command line utilities I like to code in something less cumbersome than Visual Studio, like notepad2. Then I use mcs, the command line compiler bundled with the .NET Framework to compile the source into an assembly.

I think it can be fun and good for my memory to sometimes see how much of the framework I actually remember how to use without actively using intellisense all the time. Sorry, got a bit off topic there. :)

weazl
+3  A: 

The most critical PowerShell commands are Get-Command (alias gcm) and Get-Member (alias gm). Those two commands allow you to explore and exploit most of the functionality available. Get-Member is great for interactively exploring and working with .NET objects.

The other useful series of commands are:

[System.Reflection.Assembly]::LoadFrom($relativepath)
[System.Reflection.Assembly]::LoadFile($absolutepath)

which allow you to load other assemblies into PowerShell to work with them.

Steven Murawski
A: 

I create helper batch files and run them from the command line.

I also use msbuild to build Visual Studio solutions, and nunit-console to run NUnit unit tests (I have a batch file for that). Plus all the regular cmdline goodness like grep, vim, and svn.

orip
A: 

An excellent pattern I saw once was to have a pre-compile command to retrieve the WSDL from a web service and generate the appropriate wrapper class using the wsdl.exe tool. I took that same patter in a recent project and had the xsd.exe tool generate classes from my xml schema files.

While you won't be typing in the commands interactively, you certainly need to develop something that works as well be familiar with the host (.bat scripting, powershell, whatever). Visual Studio exposes some interesting environment-like variables to help locate your project source etc. Good stuff.

Goyuix
+1  A: 

In my larger projects, I started to create customized build.cmd batch files which themselves call command line tools like:

  • graspx to check .aspx files,
  • osql to generate C# code from an MSSQL database schema and backup the dev database,
  • scptxfr to script the schema,
  • msbuild to build applications,
  • devenv to build setup solutions,
  • 7za (7zip) to zip stuff.

An occasional iisreset also helps ;)

devio
A: 

For standard development I use csc.exe and msbuild.exe. Other useful tools are wsdl.exe and svcutil.exe for web service development, and in rare cases ildasm.exe and tlbimp.exe.

Oh, yes, and then I absolutely love Powershell, but that's a whole book on it's own :-)

Saqib