Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -12,8 +12,7 @@
namespace Microsoft.Build.UnitTests.OM.Construction
{
/// <summary>
// <summary>Tests for the ProjectExtensionsElement class.</summary>
/// Tests for the class
/// Tests for the <see cref="ProjectExtensionsElement"/> class.
/// </summary>
public class ProjectExtensionsElement_Tests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void ProjectItemModify()
new KeyValuePair<string, string>("b", "bValue"),
};

/// test AddItems
// test AddItems
// add a new files in the view, ensure it is added correctly and also the real object will immediately reflect that add as well
Assert.Null(pair.GetSingleItemWithVerify(ObjectType.View, "foo.cpp"));
var fooView = pair.AddSingleItemWithVerify(ObjectType.View, "cpp", "foo.cpp");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public override ProjectItemDefinition CreateLinkedObject(IImportHolder holder)
}


/// ProjectItemDefinitionLink remoting
// ProjectItemDefinitionLink remoting
public MockProjectLinkRemoter Project => this.OwningCollection.Export<Project, MockProjectLinkRemoter>(this.Source.Project);
public string ItemType => this.Source.ItemType;
public ICollection<MockProjectMetadataLinkRemoter> Metadata => this.OwningCollection.ExportCollection<ProjectMetadata, MockProjectMetadataLinkRemoter>(this.Source.Metadata);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public override ProjectItem CreateLinkedObject(IImportHolder holder)
return holder.Linker.LinkFactory.Create(link);
}


/// ProjectItemLink remoting
// ProjectItemLink remoting
public MockProjectLinkRemoter Project => this.OwningCollection.Export<Project, MockProjectLinkRemoter>(this.Source.Project);
public MockProjectItemElementLinkRemoter Xml => (MockProjectItemElementLinkRemoter)this.OwningCollection.ExportElement(this.Source.Xml);
public string EvaluatedInclude => this.Source.EvaluatedInclude;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public override Project CreateLinkedObject(IImportHolder holder)
}


/// ProjectLink remoting
// ProjectLink remoting
public MockProjectElementLinkRemoter Xml => this.OwningCollection.ExportElement(this.Source.Xml);

public bool ThrowInsteadOfSplittingItemElement { get => this.Source.ThrowInsteadOfSplittingItemElement; set => this.Source.ThrowInsteadOfSplittingItemElement = value; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ public override ProjectMetadata CreateLinkedObject(IImportHolder holder)
return holder.Linker.LinkFactory.Create(link);
}


/// ProjectMetadataLink remoting
// ProjectMetadataLink remoting
public object Parent
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ public override ProjectProperty CreateLinkedObject(IImportHolder holder)
return holder.Linker.LinkFactory.Create(link);
}


/// ProjectPropertyLink remoting
// ProjectPropertyLink remoting
public MockProjectLinkRemoter Project => this.OwningCollection.Export<Project, MockProjectLinkRemoter>(this.Source.Project);
public MockProjectPropertyElementLinkRemoter Xml => (MockProjectPropertyElementLinkRemoter)this.ExportElement(this.Source.Xml);
public string Name => this.Source.Name;
Expand Down
7 changes: 5 additions & 2 deletions src/Build.UnitTests/BackEnd/BuildManager_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3800,9 +3800,12 @@ public void OutOfProcFileBasedP2PBuildSucceeds()
}
}

/// When a ProjectInstance based BuildRequestData is built out of proc, the node should
/// <summary>
/// When a <see cref="ProjectInstance"/> based <see cref="BuildRequestData"/> is built out of proc, the node should
/// not reload it from disk but instead fully utilize the entire translate project instance state
/// to do the build
/// to do the build.
/// </summary>
/// <param name="shouldSerializeEntireState"><see langword="true"/> to serialize the entire project instance state; otherwise, <see langword="false"/>.</param>
[Theory]
[InlineData(false)]
[InlineData(true)]
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Construction/ProjectRootElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace Microsoft.Build.Construction
[DebuggerDisplay("{FullPath} #Children={Count} DefaultTargets={DefaultTargets} ToolsVersion={ToolsVersion} InitialTargets={InitialTargets} ExplicitlyLoaded={IsExplicitlyLoaded}")]
public class ProjectRootElement : ProjectElementContainer
{
/// Constants for default (empty) project file.
// Constants for default (empty) project file.
private const string EmptyProjectFileContent = "{0}<Project{1}{2}>\r\n</Project>";
private const string EmptyProjectFileXmlDeclaration = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n";
private const string EmptyProjectFileToolsVersion = " ToolsVersion=\"" + MSBuildConstants.CurrentToolsVersion + "\"";
Expand Down
9 changes: 7 additions & 2 deletions src/Build/Utilities/EngineFileUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,14 @@ private static bool MatchesLazyWildcard(string fileSpec)
return _regexMatchCache.Value.GetOrAdd(fileSpec, file => s_lazyWildCardExpansionRegexes.Any(regex => regex.IsMatch(fileSpec)));
}

/// Returns a Func that will return true IFF its argument matches any of the specified filespecs
/// Assumes filespec may be escaped, so it unescapes it
/// <summary>
/// Returns a Func that will return true IFF its argument matches any of the specified filespecs.
/// Assumes filespec may be escaped, so it unescapes it.
/// The returned function makes no escaping assumptions or escaping operations. Its callers should control escaping.
/// </summary>
/// <param name="filespecsEscaped"></param>
/// <param name="currentDirectory"></param>
/// <returns>A Func that will return true IFF its argument matches any of the specified filespecs.</returns>
internal static Func<string, bool> GetFileSpecMatchTester(IList<string> filespecsEscaped, string currentDirectory)
{
var matchers = filespecsEscaped
Expand Down
12 changes: 9 additions & 3 deletions src/Deprecated/Engine/Engine/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,21 @@ public class Project
// control which projects it allows to run targets/tasks.
private BuildEnabledSetting buildEnabled;

/// <summary>
/// 0 means not building; >=1 means building.
// The refcount may be greater than 1 because the MSBuild task may call back in to
// cause the project to be built again.
/// The refcount may be greater than 1 because the MSBuild task may call back in to
/// cause the project to be built again.
/// </summary>
private int buildingCount = 0;

// The MSBuild ToolsVersion associated with the project file
/// <summary>
/// The MSBuild ToolsVersion associated with the project file.
/// </summary>
private string toolsVersion = null;

/// <summary>
/// true if the ToolsVersion of this project was overridden; false otherwise.
/// </summary>
private bool overridingToolsVersion = false;

// Whether when we read ToolsVersion="4.0" or greater on the <Project> tag, we treat it as "4.0".
Expand Down
1 change: 1 addition & 0 deletions src/Deprecated/Engine/Items/BuildItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ internal ItemDefinitionLibrary ItemDefinitionLibrary
set { itemDefinitionLibrary = value; }
}

/// <summary>
/// Accessor for the item's "include" string.
/// </summary>
/// <owner>RGoel</owner>
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks.UnitTests/AssemblyDependency/FilePrimary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public void ExistsPromotedDependencyInTheBlackList()
/// In this case,
/// - A single primary file reference to assembly version 1.0.0.0 was passed in.
/// - An app.config was passed in that promotes a *different* assembly version name from
// 1.0.0.0 to 2.0.0.0
/// 1.0.0.0 to 2.0.0.0
/// - Version 1.0.0.0 of the file exists.
/// - Version 2.0.0.0 of the file exists.
/// Expected:
Expand Down
2 changes: 2 additions & 0 deletions src/Tasks.UnitTests/AssemblyDependency/Miscellaneous.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7739,6 +7739,7 @@ public void Regress397129_HandleInvalidDirectoriesAndFiles_Case2()
Execute(t);
}

/// <summary>
/// Consider this dependency chain:
///
/// App
Expand All @@ -7752,6 +7753,7 @@ public void Regress397129_HandleInvalidDirectoriesAndFiles_Case2()
/// B.dll should be unresolved even though its in A's folder because primary resolution needs to work
/// without looking at dependencies because of the load-time perf scenarios don't look at dependencies.
/// We must be consistent between primaries resolved with FindDependencies=true and FindDependencies=false.
/// </summary>
[Fact]
public void ByDesignRelatedTo454863_PrimaryReferencesDontResolveToParentFolders()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void Exists()
/// In this case,
/// - A single primary non-version-strict reference was passed in to assembly version 1.0.0.0
/// - An app.config was passed in that promotes a *different* assembly version name from
// 1.0.0.0 to 2.0.0.0
/// 1.0.0.0 to 2.0.0.0
/// - Version 1.0.0.0 of the file exists.
/// - Version 2.0.0.0 of the file exists.
/// Expected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void Exists()
/// In this case,
/// - A single primary version-strict reference was passed in to assembly version 1.0.0.0
/// - An app.config was passed in that promotes a *different* assembly version name from
// 1.0.0.0 to 2.0.0.0
/// 1.0.0.0 to 2.0.0.0
/// - Version 1.0.0.0 of the file exists.
/// - Version 2.0.0.0 of the file exists.
/// Expected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public void ExistsPromotedDependencyInTheBlackList()
/// - A single reference to DependsOnUnified was passed in.
/// - This assembly depends on version 1.0.0.0 of UnifyMe.
/// - An app.config was passed in that promotes a *different* assembly version name from
// 1.0.0.0 to 2.0.0.0
/// 1.0.0.0 to 2.0.0.0
/// - Version 1.0.0.0 of the file exists.
/// - Version 2.0.0.0 of the file exists.
/// Expected:
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks.UnitTests/AssignProjectConfiguration_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public void VerifyDefaultValueDefaultToVcxPlatformMappings()

AssignProjectConfiguration assignProjectConfiguration = new AssignProjectConfiguration();

/// Test defaults with nothing set
// Test defaults with nothing set
string actualDefaultToVcxPlatformMapping = assignProjectConfiguration.DefaultToVcxPlatformMapping;
Assert.Equal(actualDefaultToVcxPlatformMapping, expectedDefaultToVcxPlatformMapping);

Expand Down