Cannot add System.Web.dll reference

前端 未结 6 1829
礼貌的吻别
礼貌的吻别 2020-12-13 23:21

I\'m trying to use the HTTP functions contained in the System.Web.dll assembly. However, whilst the dll seems to exist in the same directory as every other dll Visual Studio

相关标签:
6条回答
  • 2020-12-14 00:01

    If you target .NET 3.5 or 4 client profile, you won't see ASP.NET assemblies.

    Besides, you should try to use HTTP classes in System.Net.

    0 讨论(0)
  • 2020-12-14 00:11

    System.Web should be referenced from the GAC. This assembly has nothing to do in your application folders.

    alt text

    0 讨论(0)
  • 2020-12-14 00:12

    JoeR

    We've created a tool that will help you to achieve your goal. Muse VSReferences will allow you to add a Global Assembly Cache reference to the project from Add GAC Reference menu item.

    enter image description here

    Regards

    0 讨论(0)
  • 2020-12-14 00:13

    For people that cant find "System.Web" at .Net References, this might be the answer:

    "you need to right-click the project -> properties -> then change the "Target framework" which will probably be ".NET Framework 4 Client Profile" to just ".NET Framework 4".

    The answer was given by Tinister (thanks) as a reply to a previuos post. But I thought it was a little bit hidden at his original post. So i put it here to make it easer to be seen. Hope it helps.

    0 讨论(0)
  • 2020-12-14 00:26

    Are you trying to add a reference to the System.Web.dll file itself? System.Web is in the GAC on any Windows system, so when you add the reference in your "Add Reference" dialog, choose System.Web from the .NET tab.

    0 讨论(0)
  • 2020-12-14 00:27

    1 right click on References in Solution Explorer and press add reference...

    2 choose the browse tab and go to C:\Windows\assembly\GAC_32\System.Web\System.Web.dll and add the dll file to your references.

    0 讨论(0)
提交回复
热议问题