c# - The type or namespace name 'DescriptionAttribute' could not be found Asp.Net 5 -


i have simple class

using system; using system.componentmodel; using system.reflection;  namespace common {     public static class extensionmethods     {         public static string description(this enum value)         {             fieldinfo fi = value.gettype().getfield(value.tostring());              descriptionattribute[] attributes =                 (descriptionattribute[])fi.getcustomattributes(                 typeof(descriptionattribute),                 false);              if (attributes.length > 0)             {                 return attributes[0].description;             }              return value.tostring();         }     } } 

but i'm getting compile error -

error cs0246 type or namespace name 'descriptionattribute' not found (are missing using directive or assembly reference?)

my project.json

{   "version": "1.0.0-*",   "description": "common class library",   "authors": [ "bryan" ],   "tags": [ "" ],   "projecturl": "",   "licenseurl": "",    "frameworks": {     "net451": { },     "dotnet5.4": {       "dependencies": {         "microsoft.csharp": "4.0.1-beta-23516",         "system.collections": "4.0.11-beta-23516",         "system.linq": "4.0.1-beta-23516",         "system.runtime": "4.0.21-beta-23516",         "system.threading": "4.0.11-beta-23516"       }     }   } } 

i have tried many things adding dependencies , frameworkassemblies various versions of system.component , system not have worked.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -