Cannot suppress CA1903:UseOnlyApiFromTargetedFramework
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.
精彩评论