views:

2056

answers:

1

I am currently moving code from my app_code folder to a class library. I have tagged several methods with [System.Web.Script.Serialization.ScriptIgnore] attributes. My class library cannot see this namespace. My add references dialog cannot see this namespace. How do I properly use this tag from a class library?

The type or namespace name 'ScriptIgnoreAttribute' could not be found (are you missing a using directive or an assembly reference?)

+4  A: 

The ScriptIgnoreAttribute class is in the System.Web.Extensions.dll assembly. You have to add a reference to that assembly in your class library project.

You can find this information at top of the MSDN page for the ScriptIgnoreAttribute class.

M4N
Thank you sir...