From b05d4a1dbfeaa4d95f71843c4e0ce09a9611c143 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 16 Jun 2020 12:44:14 -0700 Subject: [PATCH] Fix API breaking change from adding SdkResolver IndicateSuccess overload --- .../net/Microsoft.Build.Framework.cs | 2 +- .../netstandard/Microsoft.Build.Framework.cs | 2 +- src/Framework/Sdk/SdkResultFactory.cs | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ref/Microsoft.Build.Framework/net/Microsoft.Build.Framework.cs b/ref/Microsoft.Build.Framework/net/Microsoft.Build.Framework.cs index 01d221bccab..46cb6ff3e51 100644 --- a/ref/Microsoft.Build.Framework/net/Microsoft.Build.Framework.cs +++ b/ref/Microsoft.Build.Framework/net/Microsoft.Build.Framework.cs @@ -508,7 +508,7 @@ public abstract partial class SdkResultFactory { protected SdkResultFactory() { } public abstract Microsoft.Build.Framework.SdkResult IndicateFailure(System.Collections.Generic.IEnumerable errors, System.Collections.Generic.IEnumerable warnings=null); - public abstract Microsoft.Build.Framework.SdkResult IndicateSuccess(System.Collections.Generic.IEnumerable paths, string version, System.Collections.Generic.IDictionary propertiesToAdd=null, System.Collections.Generic.IDictionary itemsToAdd=null, System.Collections.Generic.IEnumerable warnings=null); + public virtual Microsoft.Build.Framework.SdkResult IndicateSuccess(System.Collections.Generic.IEnumerable paths, string version, System.Collections.Generic.IDictionary propertiesToAdd=null, System.Collections.Generic.IDictionary itemsToAdd=null, System.Collections.Generic.IEnumerable warnings=null) { throw null; } public abstract Microsoft.Build.Framework.SdkResult IndicateSuccess(string path, string version, System.Collections.Generic.IEnumerable warnings=null); } public partial class SdkResultItem diff --git a/ref/Microsoft.Build.Framework/netstandard/Microsoft.Build.Framework.cs b/ref/Microsoft.Build.Framework/netstandard/Microsoft.Build.Framework.cs index ddad089f2b2..2cc97a9b041 100644 --- a/ref/Microsoft.Build.Framework/netstandard/Microsoft.Build.Framework.cs +++ b/ref/Microsoft.Build.Framework/netstandard/Microsoft.Build.Framework.cs @@ -507,7 +507,7 @@ public abstract partial class SdkResultFactory { protected SdkResultFactory() { } public abstract Microsoft.Build.Framework.SdkResult IndicateFailure(System.Collections.Generic.IEnumerable errors, System.Collections.Generic.IEnumerable warnings=null); - public abstract Microsoft.Build.Framework.SdkResult IndicateSuccess(System.Collections.Generic.IEnumerable paths, string version, System.Collections.Generic.IDictionary propertiesToAdd=null, System.Collections.Generic.IDictionary itemsToAdd=null, System.Collections.Generic.IEnumerable warnings=null); + public virtual Microsoft.Build.Framework.SdkResult IndicateSuccess(System.Collections.Generic.IEnumerable paths, string version, System.Collections.Generic.IDictionary propertiesToAdd=null, System.Collections.Generic.IDictionary itemsToAdd=null, System.Collections.Generic.IEnumerable warnings=null) { throw null; } public abstract Microsoft.Build.Framework.SdkResult IndicateSuccess(string path, string version, System.Collections.Generic.IEnumerable warnings=null); } public partial class SdkResultItem diff --git a/src/Framework/Sdk/SdkResultFactory.cs b/src/Framework/Sdk/SdkResultFactory.cs index 3ed0eda1700..1016680adc5 100644 --- a/src/Framework/Sdk/SdkResultFactory.cs +++ b/src/Framework/Sdk/SdkResultFactory.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System; using System.Collections.Generic; namespace Microsoft.Build.Framework @@ -34,11 +35,14 @@ public abstract class SdkResultFactory /// Items to add to the evaluation /// Optional warnings to display during resolution. /// - public abstract SdkResult IndicateSuccess(IEnumerable paths, + public virtual SdkResult IndicateSuccess(IEnumerable paths, string version, IDictionary propertiesToAdd = null, IDictionary itemsToAdd = null, - IEnumerable warnings = null); + IEnumerable warnings = null) + { + throw new NotImplementedException(); + } /// /// Create an object indicating failure resolving the SDK.