Reputation: 5893
There are plenty of posts on how to capture logging output while manually invoking msbuild from the console but i am wondering if there is any way to log all logging output to a file of my desire using wildcards (timestamps, Configuration etc) if the build is fired from Visual Studio.
No - running it from console is not an option. I've spent 2 days trying to get it to work. Seems like the Xamarin targets were not built with dev friendly build automation in mind.
Why is it not an option? - Wrong toolset, - wrong MSBuild, - mtouch warnings, - targets which expect env variables which seem to be added by VS at runtime
so i gave up and am looking for a way to capture my logs so i can dump the output into a file together with other artifacts.
Upvotes: 1
Views: 76
Reputation: 76670
How do i log all logging output to a file with wildcards if i run the build from visual studio
According to the How to: View, Save, and Configure Build Log Files:
After you build a project in the Visual Studio IDE, you can view information about that build in the Output window. By using this information, you can, for example, troubleshoot a build failure. For C++ projects, you can also view the same information in a .txt file that's created and saved automatically. For managed-code projects, you can copy and paste the information from the Output window into a .txt file and save it yourself. You can also use the IDE to specify what kinds of information you want to view about each build.
If you build any kind of project by using MSBuild, you can create a .txt file to save information about the build. For more information, see Obtaining Build Logs.
We could to know log file from Visual Studio is only supported for C++ projects. we have to work with the output window for others.
If you do not want to copy and pasting the content to a text file. Here is a quiets way to avoid copy past and save the content directly:
Follow these steps: 1. Set the focus to the Output Window 2. From the main menu navigate to File –> Save Selected Items (Ctrl + S) or Save Output As.
To save the content directly in to a text file.
Default filename will have the name with “Output-Build”, you can change it to what you want, but it could not use wildcards in the name.
Hope this helps.
Upvotes: 1