Results 1 to 11 of 11

Thread: Adding an External Reference

  1. #1

    Thread Starter
    Addicted Member rdove's Avatar
    Join Date
    Dec 2002
    Location
    Indianapolis
    Posts
    251

    Adding an External Reference

    I am trying to add an external reference that is located in the C:\Windows folder. I have tried referencing the control through VB.NET, but it keeps adding the reference in with my project and will not let me change the reference path.

    I do not want to have a local reference since all the computers using the program will already have the file on them.

    Specifically the reference shdocvw.dll

    Anybody know how I can just refer to this file on the hard drive instead of including it in my project?
    ~Ryan





    Have I helped you? Please Rate my posts.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Set "Copy Local" Property of that reference to False so it won't make a copy in the bin folder .

  3. #3

    Thread Starter
    Addicted Member rdove's Avatar
    Join Date
    Dec 2002
    Location
    Indianapolis
    Posts
    251
    I tried that..when I run my program I get errors...
    ~Ryan





    Have I helped you? Please Rate my posts.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by rdove
    I tried that..when I run my program I get errors...
    What error did you get ?

  5. #5

    Thread Starter
    Addicted Member rdove's Avatar
    Join Date
    Dec 2002
    Location
    Indianapolis
    Posts
    251
    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.IO.FileNotFoundException: File or assembly name Interop.SHDocVw, or one of its dependencies, was not found.
    File name: "Interop.SHDocVw"
    at CS_Prototype.Complete.Complete_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.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam).
    ~Ryan





    Have I helped you? Please Rate my posts.

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Set them to true again . It seems your only option . or copy it to another folder and map it . It should run fine .

  7. #7

    Thread Starter
    Addicted Member rdove's Avatar
    Join Date
    Dec 2002
    Location
    Indianapolis
    Posts
    251
    or copy it to another folder and map it
    How would I go about doing this? If I can map it to another folder I can use the one that is in the C:\System31 folder on the hard drive like I want to do...
    ~Ryan





    Have I helped you? Please Rate my posts.

  8. #8
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I think the only way to not have it in the application folder is to register it in the GAC. Just search the help on Global Assembly Cache. I think you have to use a regasm tool. Then it doesn't need to be in the application folder.

  9. #9
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by rdove
    How would I go about doing this? If I can map it to another folder I can use the one that is in the C:\System31 folder on the hard drive like I want to do...
    First remove it from references list , rightclick it , choose add reference ,click browse , then map to the system32 or whatever , link the file , press OK . I've tried this and worked .

  10. #10

    Thread Starter
    Addicted Member rdove's Avatar
    Join Date
    Dec 2002
    Location
    Indianapolis
    Posts
    251
    Yes, but it copies the file out of the System32 folder and puts a local copy in with your application. If only it would let me change the Path to the .dll file, but alias the property is unchanagable.
    ~Ryan





    Have I helped you? Please Rate my posts.

  11. #11
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I see no absolute problems with the way it works !!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width