2

In Visual C++ 2010, I can see the parameters which are passed to cl.exe:

enter image description here

That's very useful because sometimes you forget to check this or that option, add some directory here and there, etc and seeing all the commands at once make this easy to spot.

I was wondering if there is something like that for Visual C# 2010. I cannot see a "Command Line" tab anywhere. Apparently earlier versions showed a "Task: csc" line in the Output > Build tab, but I've not found anything like that in the output generated by Visual C# 2010 SP1.

Is it possible to obtain what I'm looking for?

NB I know I can get the parameters from MSBuild but unfortunately MSBuild cannot build some of my solutions due to failed dependency resolution. I'm looking for a pure-Visual Studio IDE solution.

zxspectrum
  • 327
  • 1
  • 3
  • 7
  • You see it in the Output window. There isn't much, the C# compiler has a lot less command line options. A side effect of having attributes. – Hans Passant May 31 '12 at 01:03

1 Answers1

5

Click Tools and select Options. Expand Project and Solutions group and click on Build and Run. For the item MSBuild project output verbosity select at least Normal (default is Minimal).

Now in the output window you'll see (main) steps performed by MSBuild and the command line of the csc process.

Adriano Repetti
  • 65,416
  • 20
  • 137
  • 208
  • 5
    Please note that the output you see there is faked. When compiling a C# project, unless you take steps to force csc.exe to be called, you will see csc in the logs, but another compiler will do the actual work without any sort of command-line. –  May 30 '12 at 22:58
  • @hvd I guess he's just interested to check passed options but very good point! – Adriano Repetti May 30 '12 at 23:02