开发者

Cannot suppress CA1903:UseOnlyApiFromTargetedFramework

开发者 https://www.devze.com 2023-01-19 07:08 出处:网络
FxCop is telling me the following: \"Assembly \'ILRetail.eBusiness.Common.WebUtility.dll\' has a reference to a开发者_运维问答ssembly

FxCop is telling me the following:

"Assembly 'ILRetail.eBusiness.Common.WebUtility.dll' has a reference to a开发者_运维问答ssembly 'System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Because this assembly was introduced in .NET Framework 3.5 Service Pack 1, which is higher than the project's target framework, .NET Framework 3.5, your application may fail to run on systems without this framework installed."

To try to suppress this, I have the following line in my assembly.cs:

[module: SuppressMessage("Microsoft.Portability", "CA1903:UseOnlyApiFromTargetedFramework", MessageId = "System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")]

I can suppress this message in other projects, just not this one.

Any ideas what I'm missing?


You need to make sure that you added the CODE_ANALYSIS compilation symbol.

0

精彩评论

暂无评论...
验证码 换一张
取 消