<_ZVcpkgGetGlobalPropertiesImported>true
/// An MSBuild task that retrieves the MSBuild Global Properties.
///
public class GetGlobalProperties : Task
{
///
/// Initializes a new instance of the class.
///
public GetGlobalProperties()
{
}
///
/// Executes the build task.
///
/// True.
public override bool Execute()
{
IReadOnlyDictionary? globalProperties = this.BuildEngine6?.GetGlobalProperties();
if (globalProperties is null)
{
Log.LogError("Unable to retrieve GlobalProperties");
return false;
}
this.GlobalPropertyNames = string.Join(";", globalProperties.Keys);
return true;
}
///
/// Gets or sets the GlobalPropertyNames parameter.
///
[Output]
public string GlobalPropertyNames { get; private set; } = string.Empty;
}
]]>