|
-
May 11th, 2003, 08:01 PM
#1
Thread Starter
Addicted Member
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?
-
May 11th, 2003, 08:05 PM
#2
Sleep mode
Set "Copy Local" Property of that reference to False so it won't make a copy in the bin folder .
-
May 11th, 2003, 09:07 PM
#3
Thread Starter
Addicted Member
I tried that..when I run my program I get errors...
-
May 11th, 2003, 09:12 PM
#4
Sleep mode
Originally posted by rdove
I tried that..when I run my program I get errors...
What error did you get ?
-
May 11th, 2003, 09:47 PM
#5
Thread Starter
Addicted Member
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).
-
May 11th, 2003, 10:08 PM
#6
Sleep mode
Set them to true again . It seems your only option . or copy it to another folder and map it . It should run fine .
-
May 11th, 2003, 11:41 PM
#7
Thread Starter
Addicted Member
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...
-
May 12th, 2003, 02:57 AM
#8
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.
-
May 12th, 2003, 03:52 AM
#9
Sleep mode
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 .
-
May 13th, 2003, 07:58 AM
#10
Thread Starter
Addicted Member
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.
-
May 13th, 2003, 10:54 AM
#11
Sleep mode
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|