I have the following code for building a solution at 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);
It works great, except if my project includes C# 6.0 features, I get errors. For example, the following:
throw new ArgumentException($"Could not find any registered events with the name {name}.");
Gives me the following:
Error Unexpected character '$'
Do I need to change some setting on my BuildManager or on the parameters? My app which is doing the building is targeting .NET 4.6 and is built by Visual Studio 2015.