D
D
daetoya2021-09-07 18:45:57
visual studio
daetoya, 2021-09-07 18:45:57

Failed to copy file 'obj\Debug\{ProjectName}.exe' - file not found?

When building a solution for my wpf project, I often get an error:

failed to copy file "obj\Debug\{ProjectName}.exe" - file not found.


I'm not the first to face this kind of problem. Tried many different tips like changing target platform version, updating .net framework, reinstalling visual studio, etc.
The only thing that helps me is restarting visual studio (doesn't work every time).
And the most surprising thing for me is that changing the AssemblyVersion in the AssemblyInfo.cs file always helps, I just change the number in the version from 1.0.0.0 (default) to 2.0.0.0 and the solution builds without errors, but after a while the error appears again and then I have to change version again.

// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]


For me, the essence of this problem remains a secret, tell me, please, how can I finally get rid of this error.

PS: the solution is small, consists of one single page WPF project and a .dll library written by me, but outside of this solution, the library works without problems.
From third-party libraries I use Microsoft.Toolkit.Wpf.UI.Controls to interact with the map

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question