|
-
Dec 11th, 2006, 01:16 PM
#1
Thread Starter
Addicted Member
[RESOLVED] [2005] Custom DLL's
I would like to be able to have a single directory that holds custom dll's (for updating purposes), rather than having a copy in each project directory that uses that dll.
On local computer .dll's are located in:
C:\Data\Controls\
On server .dll's are located in:
C:\Data\Controls\
I have referenced the dll from C:\Data\Controls\.
The error I get when trying to debug the application:
VB Code:
System.InvalidOperationException was unhandled
Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly 'Email, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
Source="PACS_Upload"
StackTrace:
at PACS_Upload.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at PACS_Upload.My.MyProject.MyForms.get_frmMain()
at PACS_Upload.My.MyApplication.OnCreateMainForm() in C:\Work\VBNET\PACS_Upload\PACS_Upload\My Project\Application.Designer.vb:line 35
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at PACS_Upload.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Is there a way to not have a copy of the dll in my bin directory, and rather point to a specified location?
-
Dec 11th, 2006, 01:17 PM
#2
Thread Starter
Addicted Member
Re: [2005] Custom DLL's
I found this article, but is there an easier way of doing this?
http://msdn2.microsoft.com/en-us/library/x66s8zcd.aspx
-
Dec 12th, 2006, 12:53 AM
#3
Re: [2005] Custom DLL's
The GAC is the way you would do what you are asking.
-
Dec 12th, 2006, 01:44 AM
#4
Re: [2005] Custom DLL's
Assuming that your using a VS Setup project, when you create your installer you can choose the Global Assembly Cache (GAC) in the File System page instead of the program folder itself.
-
Dec 12th, 2006, 10:14 AM
#5
Thread Starter
Addicted Member
Re: [2005] Custom DLL's
Thanks for the help. I created the object in the GAC. And can see it from the References window.
Thanks for the help!
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
|