I am attempting to run a build programmatically and when building any Silverlight content get the message: "C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.Common.targets(104,9): error : The Silverlight 4 SDK is not installed.", but I have installed the Silverlight 4 SDK (many times).
I attempt to do the build basically like this:
var logger = new FileLogger();
logger.Parameters = @"logfile=" + buildLogFileName;
var projectToBuild = Microsoft.Build.Evaluation.ProjectCollection.GlobalProjectCollection.LoadProject(buildFile.FullName);
projectToBuild.SetProperty("Configuration", "Release");
var successfulBuild = projectToBuild.Build(logger);
I have tried a number of workarounds and suggestions, but everything just sort of leads to other error messages. It seems like the best course would be to get it to understand that the Silverlight 4 SDK IS installed, but not sure how to do that? Or if there is something I'm missing here.