Build project with Microsoft.Build API

后端 未结 3 1448
别跟我提以往
别跟我提以往 2020-12-16 18:13

I\'m trying to build a project using the classes in Microsoft.Build.

The code is:

var project = new ProjectInstance(CS_PROJ_FILE);
project.Build();
<         


        
3条回答
  •  渐次进展
    2020-12-16 19:00

    I hit the same error after I installed:

    Install-Package Microsoft.Build -Version 15.1.1012
    

    But then I installed:

    Install-Package Microsoft.Build.Utilities.Core -Version 15.1.1012
    

    And things started working.

    A little confusing...

    I was pointed to this stackoverflow question by "dasMulli" at:

    https://github.com/Microsoft/msbuild/issues/1889

提交回复
热议问题