Skip to content

Commit 11b431c

Browse files
committed
Some more fixes.
1 parent 7b96df4 commit 11b431c

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

CompatibilityCheckerCLI/Program.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ private static void RunWithOptions(Options opts)
5656
if (referenceFile.Exists && newFile.Exists)
5757
{
5858
if (opts.AzurePipelines)
59-
Console.WriteLine("##vso[task.logdetail id={0};name=project1;type=build;order=1;state=Initialized]Starting...", timeline_guid);
59+
Console.WriteLine("##vso[task.logdetail id={0};name=BinaryCompatibilityCheck;type=build;order=1;state=Initialized]Starting...", timeline_guid);
6060
var refName = AssemblyName.GetAssemblyName(referenceFile.FullName);
6161
var newName = AssemblyName.GetAssemblyName(newFile.FullName);
62-
Console.WriteLine("{1}Using '{0}' as the reference assembly.", refName.FullName, opts.AzurePipelines ? "##vso[task.logdetail state=InProgress]" : string.Empty);
63-
Console.WriteLine("{1}Using '{0}' as the new assembly.", refName.FullName, opts.AzurePipelines ? "##vso[task.logdetail state=InProgress]" : string.Empty);
62+
Console.WriteLine("{1}Using '{0}' as the reference assembly.", refName.FullName, opts.AzurePipelines ? string.Format("##vso[task.logdetail id={0};state=InProgress]", timeline_guid) : string.Empty);
63+
Console.WriteLine("{1}Using '{0}' as the new assembly.", refName.FullName, opts.AzurePipelines ? string.Format("##vso[task.logdetail id={0};state=InProgress]", timeline_guid) : string.Empty);
6464
using (PEReader referenceAssembly = new PEReader(File.OpenRead(referenceFile.FullName)))
6565
{
6666
using (PEReader newAssembly = new PEReader(File.OpenRead(newFile.FullName)))

CompatibilityCheckerCoreCLI/Program.cs

+7-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class Options
2222
public string NewAssembly { get; set; }
2323

2424
[Option('a', "azure-pipelines", Required = false, Default = false, HelpText = "Include the logging prefixes for Azure Pipelines.")]
25-
public bool AzurePipelines { get; set; }
25+
public bool AzurePipelines { get; set; }
2626

2727
[Usage()]
2828
public static IEnumerable<Example> Examples {
@@ -55,12 +55,12 @@ private static void RunWithOptions(Options opts)
5555
FileInfo newFile = new FileInfo(opts.NewAssembly);
5656
if (referenceFile.Exists && newFile.Exists)
5757
{
58-
if(opts.AzurePipelines)
59-
Console.WriteLine("##vso[task.logdetail id={0};name=project1;type=build;order=1;state=Initialized]Starting...", timeline_guid);
58+
if (opts.AzurePipelines)
59+
Console.WriteLine("##vso[task.logdetail id={0};name=BinaryCompatibilityCheck;type=build;order=1;state=Initialized]Starting...", timeline_guid);
6060
var refName = AssemblyName.GetAssemblyName(referenceFile.FullName);
6161
var newName = AssemblyName.GetAssemblyName(newFile.FullName);
62-
Console.WriteLine("{1}Using '{0}' as the reference assembly.", refName.FullName, opts.AzurePipelines ? "##vso[task.logdetail state=InProgress]" : string.Empty);
63-
Console.WriteLine("{1}Using '{0}' as the new assembly.", refName.FullName, opts.AzurePipelines ? "##vso[task.logdetail state=InProgress]" : string.Empty);
62+
Console.WriteLine("{1}Using '{0}' as the reference assembly.", refName.FullName, opts.AzurePipelines ? string.Format("##vso[task.logdetail id={0};state=InProgress]", timeline_guid) : string.Empty);
63+
Console.WriteLine("{1}Using '{0}' as the new assembly.", refName.FullName, opts.AzurePipelines ? string.Format("##vso[task.logdetail id={0};state=InProgress]", timeline_guid) : string.Empty);
6464
using (PEReader referenceAssembly = new PEReader(File.OpenRead(referenceFile.FullName)))
6565
{
6666
using (PEReader newAssembly = new PEReader(File.OpenRead(newFile.FullName)))
@@ -75,7 +75,8 @@ private static void RunWithOptions(Options opts)
7575
Console.WriteLine(string.Format("{3}Analyzer done. {0} errors, {1} warnings, {2} informational items.", analyzer.ResultStatistics.SeverityCounts.error, analyzer.ResultStatistics.SeverityCounts.warning, analyzer.ResultStatistics.SeverityCounts.information, opts.AzurePipelines ? "##vso[task.complete result=SucceededWithIssues]" : string.Empty));
7676
Environment.ExitCode = -2;
7777
return;
78-
} else
78+
}
79+
else
7980
{
8081
Console.WriteLine(string.Format("{3}Analyzer done. {0} errors, {1} warnings, {2} informational items.", analyzer.ResultStatistics.SeverityCounts.error, analyzer.ResultStatistics.SeverityCounts.warning, analyzer.ResultStatistics.SeverityCounts.information, opts.AzurePipelines ? "##vso[task.complete result=Succeeded]" : string.Empty));
8182
return;

0 commit comments

Comments
 (0)