views:

11

answers:

1

FxCop is telling me the following:

"Assembly 'ILRetail.eBusiness.Common.WebUtility.dll' has a reference to assembly '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?

+1  A: 

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

Daniel
Worked a charm, had done this previously on my other projects and promptly forgotten
Patrick McDonald
Yes, I have done it too many times myself. :)
Daniel