Application requires log4net assembly be install in GAC first

前端 未结 2 2000
感动是毒
感动是毒 2021-01-14 05:08

When trying to install a VS2015 console app onto one of my servers, I get this error:

\"This http://imgur.com

相关标签:
2条回答
  • Problem solved.

    First I tried the answer from Nino and gacutil.exe is not installed on that server, so I could not run that cmd.

    After going through the project in Visual Studio 2015 properties/Publish settings, under Install Mode and settings, click button "Application Files..." and make sure that dll file is "included" in publishing. The dll i needed was not included, but after including it, re-published, everything installed just fine.

    0 讨论(0)
  • 2021-01-14 05:58

    you should install it into GAC using Gacutil.exe. Like this:

    gacutil /i (path to dll)\log4net.dll
    

    for additional documentation, see here

    gacutil can be found here

    C:\Program Files (x86)\Microsoft SDKs\Windows\xxxx\bin\NETFX yyyTools
    

    where xxx is windows version (ie 8.1a) and yyy .net framework version (ie 4.6.1)

    EDIT: call gacutil.exe from Developer command prompt

    Start -> Visual Studio 2015 Visual Studio Tools -> Developer Command Prompt for VS2015
    
    0 讨论(0)
提交回复
热议问题