Scottdg
Scottdg

Reputation: 113

CS2012 Cannot Open .exe for writing - Access to path is denied

I am trying to create a WPF project for the first time using VS2017 v15.8.

I am getting the error message consistently, although there are times I have been able to get it to run. When I go to run it again though I receive the error message. I have read all of the proposed solutions and nothing has worked including the following:

Restart computer Rebuild the solution/project. (tried deleting .exe file before doing this also) Confirmed the Output path is correct Kill the MSBuild process tree

I also tried different combinations.

Any help in finding a solution to this is greatly appreciated.

Upvotes: 1

Views: 1913

Answers (2)

EvilTeach
EvilTeach

Reputation: 28837

That typically happens to me, when i forget to stop my running program. As the executable is running, it is open and hence should not be overwritten.

Upvotes: 1

Scottdg
Scottdg

Reputation: 113

I have been able to work around this. The issues I was having occurred when I was trying to save the project to a network drive or to the default location in my user profile on the local drive. I tried creating it again and saved it in a root folder on the local drive it worked.

Upvotes: 0

Related Questions