This question is related to How to show command line build options in Visual C++ 2008
But in addition to showing the Compiler command line, I'd like to see the linker command line.
I have "unset" the /nologo option in the linker options.
But I still don't get the command line in the output window. What do I need to do? Is this possible?
Did you try viewing the build log? This is probably the closest to what you want to see. You view the output window, and where it says "Build log was saved at "path..."", ctrl-click on "path" and it will open the build log.
I often get burned by the wrong configuration being selected when I change things like suppress startup banner.
Did you try setting the selection when all configurations and platforms were selected?
Related
Given a Command line build step, with the following custom script:
msdeploy -verb:sync -source:package='%teamcity.build.projectid%\%WebProjectName%.csproj.zip'
how can i see what the variables ended up being replaced with?
I don't see any "verbose logging" option that holds the final output for debugging the build server anywhere
There's Parameters tab (accessible like http://teamcity/viewLog.html?buildId=BUILD_ID&tab=buildParameters where BUILD_ID should be replaced with id of the given build) in Build overview.
There're parameters values as they were resolved when build started.
This page is also accessible via popup displayed at the end of a build status text in build results row in Build Configuration Overview or Project view.
There is a file in [tempdirectory]\agentTmp called build.start.properties.gz open with something like winrar or 7zip and there is a file called build.start.properties.
In there you will be able to see the parameters used for the build like %teamcity.build.projectid%
In case anyone else comes here, the reson you are probably looking for that file is that your script isnt working, I would suggest you change
-source:package='%teamcity.build.projectid%\%WebProjectName%.csproj.zip'
"%WebProjectName%"
and include double quotes around your variables, if WebProjectName contains spaces your script might not work.
If your custom script is running in Unix-like environment you can use shell command set -x to print each command before execution
Full explanation here https://stackoverflow.com/a/2853811/2584381
If you are running on Windows, your command step has an implicit #echo off at the start.
To get full info in the logs, add
echo on
to the top of your command script.
I have a project, which use a .rules file to build some non-c++ sources. How to make MSBuild print diagnostic output from this tool? -- Precisely cerr stream.
(I silently presume, the M$ team have not reached that level of insanity, to give the custom building tools functionality without possibility to print errors from them.)
I've actually noticed you marked question with label visual-studio-2008. I guess it means your custom build tool processes non cpp files in vc2008 project? If so, I think it is not built by msbuild but with vcbuild.
In this case try to add echo on in front of command executed by custom tool.
Vcbuild creates batch files in %temp% that first line contains #echo off and then it is executed. So if you add echo on you should see complete output in output window including command line used for command execution.
I am debugging c++ console application with Visual studio. I exhausted of inserting the same input every time I debug this program. I would like to use the same input more times.
I do this without debugging in command line with command: Program.exe < 1.in
Is it possible to use debugging with standard input redirected from file???
I already tried looking in to procejt properties. I tried setting Command to $(TargetPath) < 1.in instead of $(TargetPath).
I also tried setting Command Arguments to < 1.in. Niether of these method worked.
I am using Visual Studio 2012. But this is probably same in all versions of studio.
This is a supported debugging scenario. You do have to make sure that the debugger can find the file. Leave the Command setting at $(TargetPath). A possible value for the Command Arguments setting is:
< "$(ProjectDir)test.txt"
if the input file "test.txt" is located in the project directory. Or type the full path of the file to be sure. The MSDN article that describes this feature is available here.
I just create a file called stdin.txt in the project
1) set the Build Action to Content
2) Copy to Ouput Directory: Copy if newer
Then when you build stdin.txt is copied to the same folder as the executable.
Then in project properties debug|command line arguements enter the following
< stdin.txt
There is no need to use a path macro
If you don't want to mess with the the path you can add a new file with a right click on the source files folder in the solution explorer and then paste to it the content from the wanted file. And then change the command argument to the new file name.
When I run cucumber from the windows command line I get colored output (currently using ANSICON).
When I use the following MSBuild target, run from the command line, I don't get colored output
<Target Name="Tests_Functional_Run">
<Exec Command="bundle exec cucumber" />
</Target>
Any ideas how I can get colored output in MSBuild?
First of all, I just had to read this question to see what "Colored Cucumber" was...
Are you building the project in Visual Studio, or using MSBuild from a command line? I ask because MSBuild from a command line puts out all sorts of coloured output, but I've never seen colour in the VS output window.
The coloration is an artifact of the "display module" (for lack of a better term at hand). The Windows console is sensitive to the type of message it displays from command-line output.
You'd need to make or find a VS add-in to colorize the Output pane. Or copy the text into a capable editor and use its colorizing capabilities.
Your terminal needs to support ANSI color. We use something called ANSICon here, it can be set up so it installs itself in all cmd shells and gives color output for cucumber.
I have an NUnit test assembly (a .NET DLL). When I click Run in Visual Studio I want it to launch NUnit and run the tests in this assembly. I can do all of that.
Instead of specifying the full assembly name and path in the command line arguments, does Visual Studio support some sort of macro that expands into that for the Command Line Arguments box? Most other development tools I have used support this, but I cannot find anything in the documentation about this.
I was expecting something like: %assembly_full_path%
The reason I want to do this is so if the assembly name or build location changes, then I don't have to update the command line arguments as well.
This doesn't work as far as I can tell. Macros in the Command Line arguments box do not get expanded. Not even environment variables. Bummer.
A workaround is to create a custom tool. Tools + External Tools, Add. Title = Run tests, Command = nunit.exe, Arguments = $(TargetPath), Initial Directory = $(TargetDir). Tweak as needed. You could assign a keystroke to this new tool command, even F5.
Using VS2005, the only item I need to provide in the Command Line Arguments is the name of the dll. I suspect VS sets the default working directory to the project's output directory, as I've never specified the path and yet the tests always load correctly.