Maybe I missed something, but why is it needed for the MSBuild API for a simple task?
Just from what you wrote in the question, I donβt see the need to use the API only to create a solution and capture output in a text file.
You can use the MSBuild command-line tool for this.
Building a solution using MSBuild is just as easy:
%windir%\Microsoft.net\Framework\v4.0.30319\msbuild.exe MySolution.sln
To capture the output in a text file , you just need to add the following:
(example copied from the link)
/l:FileLogger,Microsoft.Build;logfile=MyLog.log
So, the last statement is as follows:
%windir%\Microsoft.net\Framework\v4.0.30319\msbuild.exe MySolution.sln /l:FileLogger,Microsoft.Build;logfile=MyLog.log
This will create a solution and save the output of MSBuild in a text file named MyLog.log in the current directory.
source share