Failed Complie due to locked DLL

G

Guest

I have a relatively small project. The solution contains 5 aspx's and 4
custom controls. The pages are vb and the controls are in C#. Over the last
week or so I have been refining the business logic in one of the controls.
No major structural changes, just things like changing operators (+-*/) and
which variable is used where in the equation.
Yesterday, I made a change in a control to the javascript that is being
emitted to the page via the RegisterClientScriptBlock() function.

Now when I try to compile I get: "Could not write to output file
'C:\Inetpub\wwwroot\DST3\DSTControls\obj\Debug\DSTControls.dll' -- 'The
process cannot access the file because it is being used by another process. '"

The only way to compile is to exit .NET, delete the dll, then restart and
compile. If I need to make another change then repeat. Can anyone tell me
what caused this to happen, and what can be done about it?
 
C

Curt_C [MVP]

when you test are you testing from within VS or directly with IE?
If it's the first you should be fine, if it's the second then most likely
IIS is holding it. recycle the site in IIS.
 
G

Guest

I am indeed testing from IE, not VS. I restarted IIS both before and just
now, to no avail.



Curt_C said:
when you test are you testing from within VS or directly with IE?
If it's the first you should be fine, if it's the second then most likely
IIS is holding it. recycle the site in IIS.
 
P

PJ Olson

Try stopping the indexing service. I had the same problem and found an MS
article which stated that the Indexing Service will cash the dll.

I was able to either reboot my machine or wait about 10-20 mins and the
problem would go away for a while then creep back. After stopping the
Indexing Service I do believe I never saw the problem again.

I will try and find the article.

PJ



John Bankhead said:
I am indeed testing from IE, not VS. I restarted IIS both before and just
now, to no avail.
 
G

Guest

Try This :
- Open IIS MMC and locate your app's virtual directory.
- Opem Properties, Press on "Remove", check the button is changed to
"Create" now. leave the dialog box open.
- Compile your Project and than Click on "Create".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top