Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Visual Studio Problem

Options
  • 09-02-2005 1:31pm
    #1
    Registered Users Posts: 88 ✭✭


    Hi all,

    I am writing a fairly large web project in Visual Studio 2003 at the moment but an annoying error keeps popping up when I compile.
    It's fairly irregular but still happens about 30 times a day. When I try to compile my project it says 'unable to write to output file' for a particular file.
    I know that the only program that can have a lock on it is VS but it still gives this error.
    The only way for me to compile after this error is to shut down VS, delete the VSWebCache folder and restart and compile.

    Any help would be much appreciated...


Comments

  • Registered Users Posts: 7,276 ✭✭✭kenmc


    sounds like you tried to debug it and left the debugger running whilest trying to compile again. used to have this happen if i had a console app which ended up with "press any key" at the bottom, and I didn't press it. Did you try to compile the file again and see what happens? else delete it in explorer? make clean?


  • Registered Users Posts: 88 ✭✭epgriffin


    It's not the debugger left open. It tends to happen when I attempt to start debugging also. Been driving me crazy for weeks!
    The only info i have found on a similar problem is that intellisense is keeping a file open for a fraction longer than it should because of the way I have the project set up.... Would that make any sense?


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    This what you're looking for?
    When you debug or modify an assembly, you may receive the following error message:
    Unable to replace file_name.dll after compilation.

    This behavior may occur if the W3wp.exe process locks the old copy of the assembly located in the InetPub\WWWRoot\bin directory. To resolve this issue, use Task Manager to end the W3wp.exe process, recompile the assembly, and then resume the debugging process.


  • Registered Users Posts: 1,481 ✭✭✭satchmo


    I used to have a problem like this - some files wouldn't save with a similar sort of message, saying 'unable to access file' or something similar. What was even more annoying was that if I just shut down visual studio without saving again, the file would be emptied!! I lost a fair few hours work from this, it was so frustrating.

    It turned out to be Symantec (or Norton.. same thing?) anti-virus causing the problem. "Real-time protection" was enabled and when I tried to compile or save some files, norton would take over and scan the file, preventing it from being accessed. I eventually switched over to AVG anti-virus and haven't had the problem since.


  • Registered Users Posts: 88 ✭✭epgriffin


    The file access problem isn't in wwwroot directory so i don't see that being the problem although I'll try the suggestion if it happens again. I do use norton av though and it sounds like it could be a possible problem area. I'll disable it tomorrow and see if the errors crop up again....


  • Advertisement
  • Closed Accounts Posts: 8,264 ✭✭✭RicardoSmith


    Ahh Norton, is there nothing it can't screw up...


  • Registered Users Posts: 437 ✭✭Spunj


    I have had trouble with this myself in the past.

    Heres a MS KB article on it:
    http://support.microsoft.com/default.aspx?scid=kb;en-us;313512


Advertisement