Die XAML Build tat Label Quellen zu Beginn des Build, während vNext baut am Ende des Build zu beschriften scheint. Das ist mir aufgefallen, weil ich während des Builds Dateien ändere/einchecke/beschrifte. Wenn ich vNext den Build label lasse, verschiebt er das Label, das ich nach dem Einchecken auf die Dateien angewendet habe, auf die vorherige Version (die Version, die in GetSources verwendet wurde).
Aber ich habe die Beschriftung von vNext in keiner Logdatei gesehen. Habe ich es vermisst? Ich muss die Beschriftung in vnext deaktivieren und es in meinem Msbuild-Skript tun ...
edit: Deaktivierte Beschriftung in vnext-Builddefinition und Erstellen einer Msbuild-Inline-Task zum Beschriften der Quellen des Arbeitsbereichs. Jetzt kann ich alle Quellen zu Beginn der Build-Label und das Etikett für Dateien verschieben, die während des Build :)
geändert wurden Wenn jemand etwas ähnlich zu tun, hier ist meine Inline-Aufgabe:
<!--
TaskName="LabelWorkspaceSources"
- input: TfexeFullPath is the path to tf.exe
- input: BaseDirectory is the mapped folder of the software to build
- input: Label to apply
- input: Version is the changeset to apply the label to
-->
<UsingTask TaskName="LabelWorkspaceSources" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<TfexeFullPath Required="true" />
<BaseDirectory Required="true" />
<Label Required="true" />
<Version Required="true" />
</ParameterGroup>
<Task>
<Code Type="Fragment" Language="cs">
<![CDATA[
//--- get the workspace mapping ---
System.Diagnostics.Process tfProcess = new System.Diagnostics.Process();
tfProcess.StartInfo.FileName = TfexeFullPath;
tfProcess.StartInfo.Arguments = "workfold";
tfProcess.StartInfo.UseShellExecute = false;
tfProcess.StartInfo.CreateNoWindow = true;
tfProcess.StartInfo.RedirectStandardOutput = true;
tfProcess.StartInfo.WorkingDirectory = BaseDirectory;
tfProcess.Start();
string output = tfProcess.StandardOutput.ReadToEnd();
tfProcess.WaitForExit();
string workfoldOutput = output.Trim();
Log.LogMessage(workfoldOutput, MessageImportance.High);
string[] linesWorkfoldOutput = workfoldOutput.Split(new string[] { System.Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
List<string> mappedFolders = new List<string>();
Log.LogMessage("Trying to parse mapped folders.", MessageImportance.High);
foreach (string line in linesWorkfoldOutput)
{
//e.g. $/TPA: C:\TFS_Source\TPA
if (line.Contains("$/"))
{
string[] lineSplit = line.Split(new string[] { ": " }, StringSplitOptions.RemoveEmptyEntries);
//entry lineSplit[0] now contains the server path, lineSplit[1] contains the local folder
mappedFolders.Add(lineSplit[1]);
Log.LogMessage("Found mapped folder: " + lineSplit[1], MessageImportance.High);
}
}
//--- label all the mapped folders ---
foreach (string mappedFolder in mappedFolders)
{
tfProcess = new System.Diagnostics.Process();
tfProcess.StartInfo.FileName = TfexeFullPath;
tfProcess.StartInfo.Arguments = "label " + Label + " \"" + mappedFolder + "\" /child:replace /recursive /comment:\"Label created by task LabelWorkspaceSources\" /version:" + Version;
tfProcess.StartInfo.UseShellExecute = false;
tfProcess.StartInfo.CreateNoWindow = true;
tfProcess.StartInfo.RedirectStandardOutput = true;
tfProcess.StartInfo.WorkingDirectory = mappedFolder;
tfProcess.Start();
output = tfProcess.StandardOutput.ReadToEnd();
tfProcess.WaitForExit();
Log.LogMessage(tfProcess.StartInfo.Arguments, MessageImportance.High);
Log.LogMessage(output, MessageImportance.High);
}
]]>
</Code>
</Task>
</UsingTask>
würden Sie bitte einen Screenshot hinzufügen, danke im Voraus – cilerler
Sorry, kann nicht Bilder posten, mein Ruf ist zu niedrig :-( –
ohhh ich c das auch so sollte es neue Rollout sein ☺️ thx – cilerler