Avatar of directxBOB
directxBOBFlag for Ireland asked on

Could not delete file 'X' Make sure that the file is not open by another process and is not write-protected.

I am currently getting these errors:

Could not delete file 'c:\WebServices\X.dll'.
Make sure that the file is not open by another process and is not write-protected.

fatal error LNK1181: cannot open input file '..\bin\release\X.lib

What I have:

1. My WebService
2. My Managed C++ Layer
3. My UnManaged C++ Lib

My Webservice makes calls to the Managed C++ Layer which in turn makes the call to the C++ Lib.

What I found was that I was getting:

The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Which was resolved by following:


So what I have now is a Directory:


Where both the Managed and UnManaged code outputs too.. When I do a rebuild I get the above errors. I have a feeling it may be because I am referencing C:\Bin in my PATH Environment Variable but am uncertain.

Anyone have any ideas on how to fix this?
C#.NET Programming

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

All running through VS. There is no external app or webservice running them unless IIS is loading all DLLs in the PATH..

Other than that I am only compiling not actually running the WebService.


Well, the only other thing I can think of is that the file has somehow become marked read-only.

That sure is mysterious.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck