gpt4 book ai didi

c# - 如何从 C# 调用 MSBuild

转载 作者:IT王子 更新时间:2023-10-29 04:21:14 25 4
gpt4 key购买 nike

从 C#/.NET 调用 MSBuild 是否有比 shell 到 msbuild.exe 更好的方法?如果是,如何?

最佳答案

是的,添加对 Microsoft.Build.Engine 的引用并使用 Engine类(class)。

PS:注意引用正确的版本。有 2.0 和 3.5 组件,你必须 make sure that everyone gets the right one .

关于c# - 如何从 C# 调用 MSBuild,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/536539/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com