Jump to content

The process cannot access the file problem in C#

hey guys I'm just creating an 8 ball application and when i debug i get a warning saying the process cannot access the file because it is being used by another process and the file is locked by: (as seen in the image below)

image.png.764f3cdbb2e447aae20d3da0697206fe.png

image.png.150e6a15ad0ca0eb3b3aceb9e4db8735.png

 

I have no idea why I'm getting this problem, any help will be appreciated, thanks :) .

Link to comment
Share on other sites

Link to post
Share on other sites

This happens usually when you're trying to compile a new copy your application while its actually running. Close it then compile.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Ross Scarlet said:

This happens usually when you're trying to compile a new copy your application while its actually running.

ah, this is probably a stupid question but how do i check if its running 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, manlykeweaver465 said:

ah, this is probably a stupid question but how do i check if its running 

task manager? close the window? is your app hanging in the background or something

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Ross Scarlet said:

task manager? 

ohh my bad i thought you meant check it in visual studio or something lol, yeah i already checked task manager and it wasn't running there 

Link to comment
Share on other sites

Link to post
Share on other sites

15 minutes ago, Ross Scarlet said:

So running it in visual studio still doesn't work?

i restarted visual studio and it didnt work, i restarted my pc and now it works lol 

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, manlykeweaver465 said:

i restarted visual studio and it didnt work, i restarted my pc and now it works lol 

To avoid this next time, don't start the program externally via Explorer then compiling it in visual studio before its closed.

Link to comment
Share on other sites

Link to post
Share on other sites

13 hours ago, Ross Scarlet said:

To avoid this next time, don't start the program externally via Explorer then compiling it in visual studio before its closed.

thanks for your advice, ill keep that in mind :) 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×