Custom Attributes

Hi,

I defined some custom attributes in my project to store extra information with my assembly.
This works fine but the custom attributes do not appear in the version tab when i retrieve the file information in windows explorer.

I'm using vs 2003.

Can anyone help me please

Thx

 



Answer this question

Custom Attributes

  • rcat

    I know that the attribute class has nothing to do with the file attributes.

    But standard assembly attributes such as AssemblyCompany do reflect in the version tab.
    I know that vs 2003 generates a win32 resource file for the file to display this information, but it does not include my custom attributes.
    My question is how can i enforce that my attributes are included in the resource file that vs generates for the file information of assembly file


  • Comanche

    Hi,

    The custom attribute you added supplies additional information about the assembly, however it will not apear in the explorer. Every assembly has a manifest file that holds the information about the assembly, for example the version. So, if you want to change the version go to the assembly info and change it.

    Regards,



  • andrewz

    You added a custom attribute class Because this doesn't have anything todo with a file attribute.

    Can you show us you relavant code


  • Niedo

    The Attribute class has nothing todo with the file attributes. So this is a correct behaviour.


  • MmmBeer

    This is the attribute class
    /// <summary>
    /// Summary description for AssemblyVMP.
    /// </summary>
    [AttributeUsage(AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
    public sealed class AssemblyVMP : Attribute
    {
    private string _vmp;

    public AssemblyVMP(string vmp)
    {
    _vmp = vmp;
    }

    public override string ToString()
    {
    return _vmp;
    }

    }

    This allows me to add this line in the AssebmlyInfo.cs

    [assembly: AssemblyVMP("B0599")]

    But the problem is that AssemblyVMP does not appear in the version info tab when i show the properties of the assembly (.exe) in windows explorer.


  • Custom Attributes