none
Click Once dll GAC error RRS feed

  • Question

  • I have an application that I have been deploying via ClickOnce for a while now.  I just recently rolled back some code and republished the click once install and now I'm getting the following error -

     

    "Unable to install or run the application.  The application requires that assembly log4net Version 1.2.9.0 be installed in the Global Assembly Cache (GAC) first.  Please contact your system administrator."

    I have the log4net dll set to copy local as well as having that DLL set to be included in the "Application Files" area within the project properties.  I've done some research on this and it seems that doing one of the following two steps has resolved it but I am still getting the error.

    I've also tried removing this DLL from all projects as we don't use this DLL and the error still comes up after publishing.

    Any suggestions are greatly appreciated.

    Thanks

    Monday, September 13, 2010 4:11 PM

Answers

  • Do you use log4net in a bunch of different projects or just one?

    Does this happen for every user installing/updating/running the application, or just one?

    If you delete the reference to lognet in your project and re-add it, pointing it at the dll included in your project, it will make sure it's pointed to the local one and not look in the GAC.

    If you look in the Application Files dialog (assuming you don't have a VSTO app), is that dll listed, and what is it set to? It is "Prerequisite" or just "Include" ?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by JimmyJamz Friday, September 17, 2010 4:14 PM
    Friday, September 17, 2010 12:00 AM
    Moderator

  •  

    Do you use log4net in a bunch of different projects or just one?

    Does this happen for every user installing/updating/running the application, or just one?

    If you delete the reference to lognet in your project and re-add it, pointing it at the dll included in your project, it will make sure it's pointed to the local one and not look in the GAC.

    If you look in the Application Files dialog (assuming you don't have a VSTO app), is that dll listed, and what is it set to? It is "Prerequisite" or just "Include" ?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev

    I ended up rebuilding all subsequent projects with replacing all DLL references that had a possibility of hitting the log4net dll.  I then removed all DLL's from the Main project and re-added them and the it now deploys fine.  Thanks
    • Marked as answer by JimmyJamz Friday, September 17, 2010 4:14 PM
    Friday, September 17, 2010 4:14 PM

All replies

  • Hello JimmyJamz,

    Please check if this  links help you:
     http://social.msdn.microsoft.com/forums/en-US/winformssetup/thread/2ed5a986-0f88-4f39-9fb5-a0c521b3a79e

    Regards,
    Helen Zhou


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Thursday, September 16, 2010 7:27 AM
  • Unfortunately I have already set the DLL to be included as suggested in that link.  Unfortunately that hasn't resolved my issue when trying to install after publishing.
    Thursday, September 16, 2010 1:56 PM
  • Do you use log4net in a bunch of different projects or just one?

    Does this happen for every user installing/updating/running the application, or just one?

    If you delete the reference to lognet in your project and re-add it, pointing it at the dll included in your project, it will make sure it's pointed to the local one and not look in the GAC.

    If you look in the Application Files dialog (assuming you don't have a VSTO app), is that dll listed, and what is it set to? It is "Prerequisite" or just "Include" ?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    • Marked as answer by JimmyJamz Friday, September 17, 2010 4:14 PM
    Friday, September 17, 2010 12:00 AM
    Moderator

  •  

    Do you use log4net in a bunch of different projects or just one?

    Does this happen for every user installing/updating/running the application, or just one?

    If you delete the reference to lognet in your project and re-add it, pointing it at the dll included in your project, it will make sure it's pointed to the local one and not look in the GAC.

    If you look in the Application Files dialog (assuming you don't have a VSTO app), is that dll listed, and what is it set to? It is "Prerequisite" or just "Include" ?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev

    I ended up rebuilding all subsequent projects with replacing all DLL references that had a possibility of hitting the log4net dll.  I then removed all DLL's from the Main project and re-added them and the it now deploys fine.  Thanks
    • Marked as answer by JimmyJamz Friday, September 17, 2010 4:14 PM
    Friday, September 17, 2010 4:14 PM