Deploying System.Net.Http.dll with ClickOnce

六月ゝ 毕业季﹏ 提交于 2019-11-27 22:22:36

Posted message by Microsoft on Visual Studio support thread says that:

This will be fixed in the next update to Visual Studio 2013. Till then you will have to use the workaround of adding the assemblies as a link.

so, I found the next resolution (issue 8):

This occurs because ClickOnce fails to deploy certain required assemblies. As a workaround, do the following:

  1. Right-click on the project and choose Add Existing Item
  2. Browse to the HttpClient net40 package folder
  3. In the File name text box enter .
  4. Holding CTRL, select System.Net.Http.dll and System.Net.Http.Primitives.dll
  5. Click the down-arrow next to the Add button and choose Add as Link
  6. In Solution Explorer, holding CTRL select System.Net.Http.dll and System.Net.Http.WebRequest.dll
  7. Right-click the selection, choose Properties and change Copy to Output Directory to Copy always
  8. Republish

In my case, enough to add only one library System.Net.Http.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!