Showing errors from a build-time tool with source file/line

前端 未结 1 651
逝去的感伤
逝去的感伤 2021-01-21 14:09

My project has an MSBuild target which runs a tool which generated some files:



        
1条回答
  •  一向
    一向 (楼主)
    2021-01-21 14:47

    I don't know of any readily available mechanism to do this but see e.g. Viewing PowerShell's Select-String output in Visual Studio: al you need to do is make your output match what VS expects and you automatically get desired behaviour. VS looks for messages like

    (): error : 
    

    For instance msbuild, compiler, linker messages all adhere to this format. So if you have your custom tool output that format it will be shown in the Error List and you can doubleclick on it to navigate to the specified file and line.

    0 讨论(0)
提交回复
热议问题