我有以下代码用于在solutionPath构建解决方案
var properties = new Dictionary<string, string>();
properties["Configuration"] = buildType;
properties["Platform"] = "x86";
var request = new BuildRequestData(solutionPath, properties, null, new string[] { "Build" }, null);
var result = BuildManager.DefaultBuildManager.Build(parameters, request);它工作得很好,除非我的项目包含了C# 6.0特性,否则我会出错。例如,以下内容:
throw new ArgumentException($"Could not find any registered events with the name {name}.");给我以下内容:
错误意外字符“$”
我是否需要更改我的BuildManager或参数的设置?我的应用程序正在做这座大楼,目标是.NET 4.6,并由Visual 2015开发。
发布于 2015-12-08 04:54:48
看起来我的项目引用的是相关.dlls的旧版本:
更多信息在这里:
https://stackoverflow.com/questions/34148057
复制相似问题