3
votes

Am trying to publish my Web Application. It worked fine literally 15 minutes ago and not aware of anything changing in the meantime. Now receiving this error:

Copying file bin\myApp.dll to obj\Release\Package\PackageTmp\bin\myApp.dll failed. Could not find a part of the path 'obj\Release\Package\PackageTmp\bin\myApp.dll'.

Tried copying the dll manually and Windows just hangs.

Any ideas?

3

3 Answers

1
votes

Usually this happens to me when a file is locked (still in use) by windows.

Try right clicking on the solution and doing "clean" solution. Then rebuilding.

If that does not work. Try cleaning solution, closing Visual Studio, re-opening it, then publishing it.

1
votes

Think I've fixed it. Had to remote directly into the server and cut the release folder to the desktop then copy it back again. Window's threw some permission errors, which it shouldn't have as I have full permissions but worked when I clicked "Try Again". Then manually inserted the dll the same way and tried publishing again. This time it worked. Bit of a weird one but seems to be working now.

0
votes

I was looking for a solution to this problem and I've found out, in my case, that the folder was not being created when the project was published in IIS. So I've copied the folder from my project's directory to the location where the project is published.

It worked for me!