locked
WRN: Assembly binding logging is turned OFF.

    Question

  • Hello,
    Please help to solve this problem:
    I have a solution with multiple dll projects, in witch I have UserControls.
    When I try to drag & drop a custom user control (named in this (external) dll 'BaseWizardPage'), I obtain the folowing error in Visual Studio:

    ---------------------------
    Microsoft Visual Studio
    ---------------------------
    Failed to create component 'BaseWizardPage'.  The error message follows:
     'System.IO.FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905' or one of its dependencies. The system cannot find the file specified.
    File name: 'log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905'
       at Archipelago.Client.Framework.Wizards.BaseWizardPage..cctor()

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    '
    ---------------------------
    OK  
    ---------------------------


    I've tryed to modify the registry by adding the mentionned key, and manipulationg with references and registry (I can't remember any more all my actions) I made one time my solution to work in design mode, but once I restarted my system, this not works anymore...
    Thursday, November 22, 2007 11:49 AM

Answers

  • Hi,

    The error is telling you the constructor of the usercontrol caused a FileNotFound exception. You might want to check if the initialization you (apparently) built into the usercontrol is necessary during runtime. If it isn't, disable it for design time by adding the following:

    Code Block

    if (!DesignMode)

    {
        //add your initializing code (for runtime!) here

    }

     

    Hope this helps.

    Thursday, November 22, 2007 2:32 PM

All replies

  • Hi,

    The error is telling you the constructor of the usercontrol caused a FileNotFound exception. You might want to check if the initialization you (apparently) built into the usercontrol is necessary during runtime. If it isn't, disable it for design time by adding the following:

    Code Block

    if (!DesignMode)

    {
        //add your initializing code (for runtime!) here

    }

     

    Hope this helps.

    Thursday, November 22, 2007 2:32 PM
  • Hm, let's suppose, I have a simple Windows Form Form1, and I try to drag & Drop in design Mode my extern dll UserControl.

    Where should I place the code provided above? Should I override simething like OnDragDrop methods of this form? If yes, should I try something like this:

    Code Block

            protected override void OnDragDrop(DragEventArgs drgevent)
            {
                try
                {
                    base.OnDragDrop(drgevent);
                }
                catch(System.IO.FileNotFoundException)
                {              
                   
                }           
            }



    ?
    Thursday, November 22, 2007 2:44 PM