I have msbuild script that perfectly working. But when it runs when build task executed I'm seeing all output of building progress.
Is there a way to just write :
Building project ... OK.
instead of 1000 rows of text?
Use verbosity parameter to set log to the level you'd like, e.g.:
msbuild myScript.proj /verbosity:quiet
UPD:
Sorry, that was not clear from the original question, but (from the comments) it looks like you want to have different verbosity levels for different Tasks. I don't think this is supported out-of-the box. You could try 2 solutions:
Run your task using Exec task (see this question for details)
Implement a custom logger and filter messages by task name.
Related
I understand that nunit console 3 can write to TestResult.xml after running the tests, where the TestResult.xml is located inside the directory specified by --work parameter.
But from what I can tell, TestResult.xml contains too many (irrelevant) details, that I don't need to fix my unit tests errors. All I need is just the failed or ignored test cases, just like what is displayed in command line prompt when I am running nunit console in it.
How to configure the parameters for nunit console 3 so that it only gives me failed or ignored test cases?
Sorry, I'm a few months late (unfortunately I came across this problem only now). But as far as I searched, the only possibility is to use XSL transformation. There are some applications that can convert the XML report file, but... I tested a few, but unfortunately the output was not that was I need.
Therefore I created a simple NUnit3summary application that can transform the standard XML output file to text file. I was surprised that nobody until now made something like this (or at least did not publish it). It were only two hours of work (first working version) and a few more to finish it to stare ready for publishing.
It is only a simple application that was aimed for my needs. You can use filtration for now only with another application, e.g.:
NUnit3summary.exe TestResult.xml | grep Failed >FailedTests.txt
You can see a practical application here (this is also the project where the application was needed, because of too many errors in unit tests).
In SSIS package i have multiple scripts running within a job. At any given time i want to read how many scripts have been executed eg, 5/10 (50%) have been completed. Please tell how can i achieve that?
Currently there is no such functionality provided by SSIS to track progress of package execution.
It seems you need to write your own custom utility/application to implement same or use third party one.
There are few ways to do -
Using a switch called /Reporting or /Rep of DTEXEC at the command-line . For example:
DTEXEC /F ssisexample.dtsx /Rep P > progress.txt
2.Implement package logging or customize it.
3 . Implement Event handler on required executable. You can also use OnPipelineRowsSent log of Data Flow Task.
If you want to write your own application then below thread will provide nice starting point.
How do you code the Package Execution Progress window in C#
In my experience, we are using another software to monitor the jobs that are running. http://en.wikipedia.org/wiki/CA_Workload_Automation_AE
You can also try to create your own application that runs on the background that checks that status of your jobs, through checking the logs.
I have a Visual Studio 2005 solution/vcproj which has a post-build task that runs unit tests. I want to build it using msbuild.exe.
However, when the tests fail, I do not see any output logged to the console (I've verified that output is logged when executed at the command line.) I can see the output if I use the /v:detailed parameter. Is there a better way to do this? Ideally, I only want to see the output if a test fails.
Thanks.
To answer my own question, the best way I've found is to call msbuild and pass parameters down to vcbuild:
msbuild ... /p:VCBuildAdditionalOptions="/M /logfile:logfile.log" || type logfile.log
So if the build fails, the errors that were logged will be output at the end of the build which is sufficient for me.
i want to execute SubWCRev.exe in msbuild to check for local modifications .if local modifications found then i want to display message on command prompt.
please tell me how can i use this.
thanks
Using MSBuild Exec task you can't get the output, so you'll have to write an MSBuild custom task to do that (Or an inline task if you are using MSBuild v4).
In that task you'll execute SubWCRev.exe, parse the result and set it to an output property.
We have a long-running msbuild script that I'm trying to speed up. Is there a way to get msbuild to log the time spent in each target?
I've had a look at the xml logger, but it just outputs the total time.
Would I have to make my own logger, or is there something built in?
Its actually quite easy, in the command line, just add this:
/consoleloggerparameters:PerformanceSummary
There's also useful msbuild argument when you want to analyze which particular project in the solution is taken long time:
https://msdn.microsoft.com/en-us/library/ms164311.aspx
/detailedsummary /ds Show detailed information at the end of the build
log about the configurations that were built and how they were
scheduled to nodes.
Fantastic explanation about format is given here:
https://blogs.msdn.microsoft.com/visualstudio/2010/03/05/msbuild-4-detailed-build-summary/