diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteChain.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteChain.cs index f0803f3f96d7e..ca65e64ca557b 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteChain.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/src/ServiceLookup/CallSiteChain.cs @@ -39,7 +39,7 @@ public void Add(Type serviceType, Type implementationType = null) private string CreateCircularDependencyExceptionMessage(Type type) { var messageBuilder = new StringBuilder(); - messageBuilder.AppendFormat(SR.CircularDependencyException, TypeNameHelper.GetTypeDisplayName(type)); + messageBuilder.Append(SR.Format(SR.CircularDependencyException, TypeNameHelper.GetTypeDisplayName(type))); messageBuilder.AppendLine(); AppendResolutionPath(messageBuilder, type);