views:

130

answers:

1

Hello everyone, I'm trying to fulfil FxCop's rules in my web site. Since I use some Infragistics controls I have a licenses.licx file that turns into a "app_licenses.dll" assembly after publication.

The problem is that this app_licenses.dll assembly does not comply with rule CA1016 (MarkAssembliesWithAssemblyVersion), and I should add an AssemblyVersion attribute to 'App_Licenses.dll'.

I found I can add an AssemblyInfo file to my web site and then reference it from the web.config file as following:

<compilers>
<compiler language="c#;cs;csharp" extension=".cs" compilerOptions="C:\....\AssemblyInfo.cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5" />
<providerOption name="WarnAsError" value="false" />
</compiler>
</compilers>

AssemblyInfo.cs contains:

using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Resources;

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: NeutralResourcesLanguageAttribute("es-ES")]

NeutralResourcesLanguageAttribute worked for another auto-generated dll in the web site (app_GlobalResources.dll) for another FxCop rule, but app_licenses.dll seems to ignore the assembly info and still pops up the same CA1016 error.

Any help would be much appreciated.

A: 

I would ignore the rule. Not all rules make sense in all scenarios. That simple.

TomTom
That doesn't depend on me! I have to try it or at least give explanations about why I cannot fix it