AssemblyMetadata in .NET < 4.5?
cmeeren opened this issue · 3 comments
cmeeren commented
I tried creating a .NET 4.0 project. Unfortunately, the AssemblyMetadata
attribute does not seem to exist. Is there an alternative?
ulrichb commented
Yes, AssemblyMetadata
is only available in .NET >= 4.5.
But it works also with an "user defined" attribute with the same FullName:
namespace System.Reflection
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public sealed class AssemblyMetadataAttribute : Attribute
{
public AssemblyMetadataAttribute(string key, string value) { }
}
}
cmeeren commented
Thanks. Does it have to be defined in System.Reflection
?
ulrichb commented
Yes.