Deploying System.Net.Http.dll with ClickOnce

后端 未结 1 850
闹比i
闹比i 2020-12-06 02:37

I\'m developing an application which is to be deployed with ClickOnce. After downgrading from .NET 4.5 to .NET 4.0 and replacing repairing bad references, now I have problem

相关标签:
1条回答
  • 2020-12-06 02:52

    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.

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