none
Assembly [x] could not be found. Ensure the path is correct.

    Question

  • Hi all,

    I am working on a Solution which houses three projects. One of the projects is a Windows Control Library project, which holds two ActiveX components (Usercontrols, COM visible).
    Everything regarding building/testing worked fine, until I copied the project to our CVS folder.
    When I set the Windows Control Library Project to be the startup project, and pless play (start), the Usercontrol Testcontainer comes with an exception at startup, saying the assembly could not be found.

    I've tried rebuilding and cleaning the project, without any luck. I've also searched for files pointing to my old folder (VS cache files) and deleted these, without any luck either.
    I've also tried to add another Windows Control Library project with a clean Usercontrol, and set that project as startup project, but the same exception occurs, now pointing to the new dll file.

    In the old folder (where I copied the project from), everything works fine when I set the ActiveX-project as the startup project.

    See details of the exception below:

    System.ArgumentException was unhandled
      Message="Assembly 'D:\\proj\\386\\c#%5CRHSCameraControl%5CSourcecode%5CRHSCameraControl.ActiveX%5Cobj%5CRelease%5CRHSCameraControlActiveX.dll' could not be found.  Ensure the path is correct."
      Source="UserControlTestContainer"
      StackTrace:
           at Microsoft.VisualStudio.Tools.UserControlTestContainer.UserControlTestContainer_Load(Object sender, EventArgs e)
           at System.Windows.Forms.Form.OnLoad(EventArgs e)
           at System.Windows.Forms.Form.OnCreateControl()
           at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
           at System.Windows.Forms.Control.CreateControl()
           at System.Windows.Forms.Control.WmShowWindow(Message& m)
           at System.Windows.Forms.Control.WndProc(Message& m)
           at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
           at System.Windows.Forms.ContainerControl.WndProc(Message& m)
           at System.Windows.Forms.Form.WmShowWindow(Message& m)
           at System.Windows.Forms.Form.WndProc(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
           at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
           at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
           at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
           at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
           at System.Windows.Forms.Control.set_Visible(Boolean value)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.Run(Form mainForm)
           at Microsoft.VisualStudio.Tools.UserControlTestContainer.Main(String[] args)

    I really am stuck on this one, since I don't know in which direction to look.
    Tuesday, January 19, 2010 10:27 AM

Answers

  • I found the solution:

    The folder structure in which my solution was placed in the CVS root, contained a '#' ('\proj\311\c#\[mysolution]'). I tried placing it in another folder, without the '#' and that works fine!
    What I see from the exception message is that Visual Studio encodes the path to HTML-safe characters, but only for the solution part of the path; the path in front (where the solution is placed) is untouched. See below the path in the exception message:

    '\proj\311\c#%5CRHSCameraControl%5CSourcecode%5CRHSCameraControl.ActiveX%5Cobj%5CRelease%5CRHSCameraControlActiveX.dll'

    Seems like a bug?

     

    Tuesday, January 26, 2010 8:55 AM

All replies

  • Hello,
    Are you sure all the paths your reference activeX control are correct? If you use relative path to reference the ActiveX control, there maybe the error for the failing to reference the control.
    Thanks
    Chao
    Thursday, January 21, 2010 10:04 AM
    Moderator
  • Hi Chao Kuo,

    What exactly do you mean with 'paths your reference activeX control'? I've never set any paths manually.

    The weird thing is, that even when I add a new project to my solution, a Windows Control Library, he won't start the newly created UserControl1 neither.

    This let's me think there is something in my solution/test container which isn't right.

    Tuesday, January 26, 2010 7:22 AM
  • I found the solution:

    The folder structure in which my solution was placed in the CVS root, contained a '#' ('\proj\311\c#\[mysolution]'). I tried placing it in another folder, without the '#' and that works fine!
    What I see from the exception message is that Visual Studio encodes the path to HTML-safe characters, but only for the solution part of the path; the path in front (where the solution is placed) is untouched. See below the path in the exception message:

    '\proj\311\c#%5CRHSCameraControl%5CSourcecode%5CRHSCameraControl.ActiveX%5Cobj%5CRelease%5CRHSCameraControlActiveX.dll'

    Seems like a bug?

     

    Tuesday, January 26, 2010 8:55 AM