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

前端 未结 6 1764
孤独总比滥情好
孤独总比滥情好 2021-01-03 20:42

I have a Web API 2 project with help pages that runs fine locally but throws this error when I push it to Azure:

Method not found: \'System.String Sys

6条回答
  •  一个人的身影
    2021-01-03 20:58

    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 });
    

提交回复
热议问题