You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
When using msbuild for a solution containing multiple projects, with the /p:ErrorLog parameter, it only saves Roslyn Analyzers' results for the last project but not for the other projects.
#24319
Closed
JiandongJiang opened this issue
Jan 18, 2018
· 4 comments
Create a solution and add more than one C# project to it.
Create a .targets which includes some paths to the Roslyn analyzers, and save it in the folder $(MSBuildUserExtensionsPath)$(MSBuildToolsVersion)\Microsoft.CSharp.targets\ImportAfter
Run a MSBuild command line, like this:
MSBuild.exe SolutionWithMultipleProjects.sln [options] /p:ErrorLog=OutputName.sarif
Check the analysis results in the output OutputName.sarif.
Expected Behavior:
/p:ErrorLog will save the Roslyn analysis results for all the projects in a solution.
Actual Behavior:
/p:ErrorLog only saves the Roslyn analysis results for the last project.
The text was updated successfully, but these errors were encountered:
Note the effective ask here is for /errorlog compiler switch to append to the given error log file as opposed to overwrite.
Workaround for the customer is to use separate error log files per-project, but they would prefer generating a single error log file for the entire solution.
Thanks, Manish.
To clarify this is more of a blocking issue for us, than a preference. We cannot easily call MSBuild once per project; we're just 'replaying' the MSBuild cmd that was done earlier in the build.
Version Used: MSBuild.exe v14.0 and v15.0
Steps to Reproduce:
MSBuild.exe SolutionWithMultipleProjects.sln [options] /p:ErrorLog=OutputName.sarif
Expected Behavior:
/p:ErrorLog will save the Roslyn analysis results for all the projects in a solution.
Actual Behavior:
/p:ErrorLog only saves the Roslyn analysis results for the last project.
The text was updated successfully, but these errors were encountered: