();
foreach (ITaskItem package in Packages) {
string packageSpec = package.ItemSpec;
bool found = false;
foreach (var dir in dirs)
if (Path.GetFileName(dir).StartsWith(packageSpec, StringComparison.OrdinalIgnoreCase)) {
found = true;
break;
}
if (!found)
missingPackages.Add(packageSpec);
}
if (missingPackages.Any()) {
if (CompactMessage) {
Log.LogError("NuGet package restore is not currently enabled. For more information, please see: http://aspnetwebstack.codeplex.com/wikipage?title=NuGet+Packages");
}
else {
Log.LogMessage(MessageImportance.High, "The following NuGet packages have not yet been downloaded:");
foreach (var missingPackage in missingPackages)
Log.LogMessage(MessageImportance.High, " " + missingPackage);
Log.LogMessage(MessageImportance.High, "For more information on enabling package restore, please see:");
Log.LogMessage(MessageImportance.High, "http://aspnetwebstack.codeplex.com/wikipage?title=NuGet+Packages");
}
return false;
}
return true;
}
catch (Exception ex) {
Log.LogErrorFromException(ex);
return false;
}
]]>