|
-
May 28th, 2011, 06:14 AM
#1
Thread Starter
Hyperactive Member
Issues with DLL
Hi,
I am having problem with compiling the DLL. Here is the scenario:
Let's say I have created a DLL and App1 is using it. the application will monitor a folder for several hours. The dll and the app1.exe is copied to C:\foder1 directory. The application is running without any problem.
Let's say I need to make changes to that DLL. If I open the DLL project in my Visual studio and compile it, it says that the file is currently used. DLL project is stored in different path. let's say in D: drive.
Why it says the dll is used? The app1 should use the DLL in C:\folder1.
How to avoid this problem?
Thanks
-
May 28th, 2011, 09:20 AM
#2
Re: Issues with DLL
I've got a similar setup, but I have never had this problem. I have an app that uses a whole bunch of dlls. While testing, I can be running an instance of VS that is testing the main app, while simultaneoulsly running an instance of VS that has the dll project open. When running, the main app uses the dll from some folder (call it C:\dll), but when VS compiles the dll, it will compile to the Bin folder in the dll project.
If I have the app running in VS in one instance, and re-compile the dll in the other instance of VS, then when I switch back to the first instance, I will get a message about the source file being out of date and would I like to re-load it. Therefore, compiling the dll in one instance of VS is noted by the other instance of VS, even when the program is running. However, regardless of whether I do re-load the files, until I copy the dll from the bin folder into the C:\dll folder, the app won't use the new version, and I can't copy that dll over while the app is running.
What this shows is that VS has the source files entangled, even though it is using the compiled dll from a folder that is different from the one it compiles the dll to. That entanglement shouldn't exist for an app that is running outside of VS, though. Are you running the app inside VS?
My usual boring signature: Nothing
 
-
May 29th, 2011, 06:24 AM
#3
Thread Starter
Hyperactive Member
Re: Issues with DLL
Are you running the app inside VS?
No.
I have created the DLL and I have created App1. App1 uses that DLL (DLL project is referenced in APP1 not just DLL component). I am copying the App1 to C: drive and it is running. My source code is stored in D: drive. I am opening the App1 project from D: drive and start making changes to it. So that I can use the same for another purpose (depending upon value in app.config). Now I am compiling the Application and am getting the DLL reference error (as the app1 in C: drive is running; if I close that application then app compiles fine).
It would be nice if there is a way to get rid of this problem.
Thanks
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
|