Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Managed C++ Assembly Attributes

Is there a way to add assembly attributes to a Managed C++ assembly? In a typical C# project, there is usually a line of code in the AssemblyInfo.cs file like the following one:

[assembly: AssemblyTitle("Some Assembly")]

I have a private assembly attribute that I want to add (not one of the version attributes that could be added through a resource file), and I am not sure if this is possible.

like image 596
Steve Wranovsky Avatar asked Oct 01 '08 17:10

Steve Wranovsky


1 Answers

It is possible - the easy way is to add an AssemblyInfo.cpp file and put:

#include attributes.h //your attribute decl
[assembly: MyCustomAttribute()];

It can be in any file you want, though.

edit - added required semicolon for assembly attribute

like image 99
Philip Rieck Avatar answered Oct 04 '22 01:10

Philip Rieck