I compiled the code using VS 2005, and it worked. I made a tiny change though
"Bruno Jouhier [MVP]" wrote:
> You cannot do it with VS 2003 (you can "consume" attributes in J# but you
> cannot "author" them).
> You will be able to do it with the upcoming VS 2005.
>
> Bruno.
>
> "Avid J# Programmer" <AvidJProgrammer@discussions.microsoft.com> a écrit
> dans le message de news:
> 88A95F0A-90EB-435D-8072-EC3EFAE16978@microsoft.com...
> > Is it possible to define customer attributes in a J# application? I've
> > seen
> > it done in C#, but i tried it in J# and it wouldn't work. I tried the
> > following code:
> >
> > /** @attribute System.AttributeUsage (System.AttributeTargets.Assembly) */
> > public class BuildLocationAttribute extends Attribute
> > {
> > private String BuildLocation;
> > public BuildLocationAttribute(String bl){BuildLocation = bl;}
> > public String getBuildLocation(){return BuildLocation;}
> > }
> >
> > and I get an error saying "Cannot author attributes, enums or value
> > types".
> > It doesn't seem to like the fact that i'm extending from the Attribute
> > class
> >
> > Is there a way around this? I just want to state the build location inside
> > the application exe's Version Tab in the file properties. Any help with
> > this
> > would be greatly appreciated =)
> > --
> >
http://www.hungryshadow.com >
>