Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ namespace Microsoft.Build.BackEnd
/// </summary>
internal class RequestBuilder : IRequestBuilder, IRequestBuilderCallback, IBuildComponent
{
private const string BuildXLAugmentedManifestHandle = "BUILDXL_AUGMENTED_MANIFEST_HANDLE";

/// <summary>
/// The dedicated scheduler object.
/// </summary>
Expand Down Expand Up @@ -1289,7 +1291,10 @@ private void ClearVariablesNotInEnvironment(IDictionary<string, string> savedEnv
{
foreach (KeyValuePair<string, string> entry in currentEnvironment)
{
if (!savedEnvironment.ContainsKey(entry.Key))
// TODO: The BuildXLAugmentedManifestHandle condition is necessary to ensure the
// BuildXLAugmentedManifestHandle environment variable is set when file accesses are reported
// by the VBCSCompilerLogger. Remove it once Roslyn natively reports file accesses to MSBuild.
if (!savedEnvironment.ContainsKey(entry.Key) && !entry.Key.Equals(BuildXLAugmentedManifestHandle))
{
Environment.SetEnvironmentVariable(entry.Key, null);
}
Expand Down