none
Can I have a System,Web reference in a Class Library? RRS feed

  • Question

  • Guys, Can I have a System,Web reference in a Class Library? I'm using the Json class from System.Web.Helpers.Json. Some experienced developers say that's not a good idea, due to pattern reasons.

    Thanks.

    Thursday, May 16, 2013 5:13 PM

Answers

  • You can do this, if needed.  Many people try to avoid it.  Note that, if you're targeting .NET 3.5 or 4.0, you won't be able to have your library target the client profile if you do this, either, which forces all users of your lib into the full profile.

    If you're taking this dependency just for json parsing, a 3rd party library might be a better approach, but that's really dependent on a lot of factors.


    Reed Copsey, Jr. - http://reedcopsey.com
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    Thursday, May 16, 2013 5:19 PM
    Moderator

All replies