Hey Simon,

Those attributes are compiled as part of the .rsrc section.
They're basically special Win32 resources.

This is bug https://github.com/jbevain/cecil/issues/3

Jb

On Oct 14, 2012, at 2:48 AM, Simon wrote:

> So when I set AssemblyInformationalVersionAttribute in code (as part of a 
> compile) it appears in the files "Product version" when viewing properties in 
> windows explorer.
> 
> However when set this attribute post compile with Cecil it does not show up 
> in "Product version"
> 
> code is basically this 
> 
> 
>         var customAttributes = ModuleDefinition.Assembly.CustomAttributes;
>         var versionAttribute = GetVersionAttribute();
>         var constructor = 
> ModuleDefinition.Import(versionAttribute.Methods.First(x => x.IsConstructor));
>         var customAttribute = new CustomAttribute(constructor);
>         customAttribute.ConstructorArguments.Add(new 
> CustomAttributeArgument(ModuleDefinition.TypeSystem.String, "Foo"));
>         customAttributes.Add(customAttribute);
> 
> Obviously I am doing something wrong... any ideas?
> 
> -- 
> --
> mono-cecil

-- 
--
mono-cecil

Reply via email to