You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Nerdbank.GitVersioning.Tasks/GetBuildVersion.cs
+23-4Lines changed: 23 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
usingMicrosoft.Build.Framework;
9
9
usingMicrosoft.Build.Utilities;
10
10
usingMSBuildExtensionTask;
11
+
usingValidation;
11
12
12
13
publicclassGetBuildVersion:ContextAwareTask
13
14
{
@@ -41,10 +42,18 @@ public GetBuildVersion()
41
42
publicstringGitRepoRoot{get;set;}
42
43
43
44
/// <summary>
44
-
/// Gets or sets the project path relative to Git Root. This is the case where GitRepoRoot might be different from where project folder is getting built
45
-
/// If null or empty, default behavior will be to use Environment.CurrentDirectory and substring GitRepoRoot to search the GIT Tree for version.json
45
+
/// Gets or sets the relative path from the <see cref="GitRepoRoot"/> to the directory under it that contains the project being built.
46
46
/// </summary>
47
-
publicstringGitProjectRelativePath{get;set;}
47
+
/// <value>
48
+
/// If not supplied, the directories from <see cref="GitRepoRoot"/> to <see cref="Environment.CurrentDirectory"/>
49
+
/// will be searched for version.json.
50
+
/// If supplied, the value <em>must</em> fall beneath the <see cref="GitRepoRoot"/> (i.e. this value should not contain "..\").
51
+
/// </value>
52
+
/// <remarks>
53
+
/// This property is useful when the project that MSBuild is building is not found under <see cref="GitRepoRoot"/> such that the
54
+
/// relative path can be calculated automatically.
0 commit comments