Method not found: 'System.String System.String.Format(System.IFormatProvider, System.String, System.Object)

According to its MSDN page, the overload you're using is only supported on .NET 4.6.

Either configure the host to run .NET 4.6 or change the target framework of the project to 4.5 and recompile.

In 4.5 there's a params object[] overload which will then be chosen, without having to alter your code.


This doesn't make sense. We've had a line of code like this in our application since 2009

String.Format(CultureInfo.CurrentCulture, "You must specify a new password of {0} or more characters.", _membershipService.MinPasswordLength);

Recently we upped the project to .NET 4.6 and now, for me at least, this line breaks with the same error. So obviously the new overload is breaking something, and the method is not new.


If you can neither upgrade host to 4.6 nor downgrade project to 4.5 there is a workaround : pass an "object[]" as args instead of an "object". So you will force usage of the "params object[]" overload. Example :

return string.Format(formatProvider, "{0:" + format + "}", new object[] { value });