Building programmatically a project

后端 未结 3 1974
心在旅途
心在旅途 2021-01-04 04:02

I need to build a project programmatically for a .csproj I am creating on the fly. While searching Google I found the classes and API provided by the MS for the MSBuild Engi

3条回答
  •  囚心锁ツ
    2021-01-04 04:37

    You need to add a instance of a class that implements the ILogger interface to your BuildParameters. You can add a new instance of one of the supplied loggers in the Microsft.Build.Logging namespace, or you can implement ILogger yourself as it is very small and there is a helper class in the Microsoft.Build.Utilities namespace called Logger that is easy to extend.

    Build loggers

    ILogger interface

    Logger helper

提交回复
热议问题