Could not load file or assembly 'System.Net.Http' or one of its dependencies

前端 未结 6 1598
你的背包
你的背包 2021-01-12 14:11

Maybe Relevant information: I have a web application I built with .net 4.5. I wanted to deploy to Azure\'s Web Sites but it only supports .net 4.0 so I downgraded the projec

6条回答
  •  孤独总比滥情好
    2021-01-12 14:16

    System.NET.HTTP.dll only depends on System.dll, System.Core.dll and mscorlib.dll.

    Make sure you have this DLL (System.NET.HTTP.dll) in your deployment package (you can do RDP connect and check deployment folder). Play with "Copy to Local" property of reference, or include this dll in your project on root level and set type "content" in properties.

    Also System.Net.Http.dll is also supported for .NET 2.0 as i see - that might cause an issue. So additionally to above try to set property of reference "Specific version" = true

提交回复
热议问题