none
Hidden Reference to System.Web RRS feed

  • Question

  • I have a VB.NET class library project in a a solution along with several Windows Form projects. The class library project targets the .NET Framework 4 in the advanced compiler options.

    References in the class library project include CyrstalDecisions.CrystalReports.Engine, ..ReportsSource, ..Shared along with several system references but nothing that says system.web.

    The solution and all projects within it had been building successfully for a long time but out of no where I started getting errors saying "the referenced class library assembly could not be resolved because it has a dependency on System.Web, version 4.0.0.0".

    I've looked everywhere in the class library project and cannot find a single reference to system.web. I've excluded all of the class files that are in the library from the project but continue to get the error when compiling any one of the windows form projects that depend on the class library.

    Is there a quick way to find this dependency?

    Thank you, Herb


    Herb

    Thursday, January 3, 2013 10:00 PM

Answers

  • Hi Herb,

    Sorry for haven't follow up this case.

    If .NET is installed without problem, we should check something else.

    When you get that error message, there is a error window which will tell you where you used that reference. By the way, you should also check if system.web is under your reference folder. If you can see it, you should open it property and see if the dll folder have this file exist.

    What's more, will a new simple project reproduce your issue?

    Regards,


    Barry Wang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 15, 2013 6:15 AM
    Moderator

All replies

  • Hi Herb,

    Thanks for your post.

    Can you confirm that you are target to .NET Framework 4 Full but not .NET Framework 4 Client profile?

    Can you find system.web.dll from the following location:

    C:\Windows\Microsoft.NET\Framework\v4.0.30319

    I want to know if this issue is specific to corrupt .NET or corrupt project.

    What's more, please use this tool http://blogs.msdn.com/b/astebner/archive/2008/10/13/8999004.aspx to verify .net 4 on your OS and share your result here.

    Regards,


    Barry Wang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Friday, January 4, 2013 9:04 AM
    Moderator
  • Thanks for the quick reply Barry,

    Results of verification test:

    [01/04/13,09:12:39] Process 'Netfx40TestApplication.exe' exited with return code 0
    [01/04/13,09:12:39] Verification succeeded for product .NET Framework 4 Full

    The system.web.dll is in the folder that you specified and is dated 12/26/2011 3:54am

    The class library project does target .NET Framework 4 but I checked the windows form projects and some of them target .NET Framework 4 Client Profile. Could that be the problem? They all make use of the class library so should they all target .NET Framework 4?

    Thanks again for your help... Herb


    Herb

    Friday, January 4, 2013 2:17 PM
  • Hi Herb,

    Sorry for haven't follow up this case.

    If .NET is installed without problem, we should check something else.

    When you get that error message, there is a error window which will tell you where you used that reference. By the way, you should also check if system.web is under your reference folder. If you can see it, you should open it property and see if the dll folder have this file exist.

    What's more, will a new simple project reproduce your issue?

    Regards,


    Barry Wang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 15, 2013 6:15 AM
    Moderator
  • Hi Barry,

    Thanks for the follow-up. I found that the problem was as I had stated in my last reply. The projects in the solution were a mix of .Net Framework 4 and .NET Framework 4 Client Profile. Once I converted them all to .NET Framework 4 the solution compiled correctly every time.

    Many thanks for your help sir...

    Herb


    Herb

    Tuesday, January 15, 2013 12:32 PM
  • Thanks very much for taking the time to share your solution with us!

    That information will be very helpful to all MSDN forums users with similar issues.

    Wednesday, January 16, 2013 2:38 PM