的分析器是否相同
对于exmaple,我得到错误:
CA1056 URI properties should not be strings Change the type of property 'CoreCallbackServiceConfiguration.UriTemplate' from string to System.Uri.
用于推进
[SuppressMessage("Microsoft.Design", "CA1056:UriPropertiesShouldNotBeStrings", Justification = "The template should be string")]
[DataMember(Name = "uriTemplate")]
public string UriTemplate { get; set; }
你知道有压力,但我还是犯了错误。我团队中的其他人不会犯这种错误。有什么想法吗?
以下对我有效:
[SuppressMessage("Design", "CA1056:Uri properties should not be strings", Justification = "This is a DB table field")]
请记住,我正在.NET Core 3中使用此功能。我不确定其他版本的.NET.