以编程方式运行X86版本的MSBuild

时间:2014-03-23 08:17:30

标签: msbuild msbuild-4.0

我目前正在使用以下代码以编程方式运行MSBuild:

var pc = new ProjectCollection();
var buildProperties = new Dictionary<string, string>
    {
          {"Configuration", "Release"},
          {"Platform", "Any CPU"},
          {"OutputPath", _outputPath},
          {"EnableNuGetPackageRestore", "true"}
    };

var buildParameters = new BuildParameters(pc);
var buildRequest = new BuildRequestData(_solutionFilePath,
                       buildProperties,
                       "4.0", 
                       new[] { "Rebuild" }, 
                       null);

如何强制使用X86版本的MSBuild运行时而不是X64版本运行上述内容。内部运行的应用程序是64位应用程序。

0 个答案:

没有答案