1
I’m watching some video lessons on Youtube about C# but there’s one in question that I can’t solve at first.
The C# code I am using is exactly this below:
using System;
namespace IniciandoProjeto
{
class Principal
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
Console.ReadKey();
}
}
}
I’m using the CTRL+F5
to see what happens on the screen, but does not execute. And if I use only the F5
is the black screen, only.
The mistakes that come to me are these:
Warning 10 Could not copy "obj\Debug\AprendendoVideoAula1.exe" to "bin\Debug\AprendendoVideoAula1.exe". Beginning retry 10 in 1000ms. The process cannot access the file 'bin\Debug\AprendendoVideoAula1.exe' because it is being used by another process. AprendendoVideoAula1
Error 11 Could not copy "obj\Debug\AprendendoVideoAula1.exe" to "bin\Debug\AprendendoVideoAula1.exe". Exceeded retry count of 10. Failed. AprendendoVideoAula1
Error 12 Unable to copy file "obj\Debug\AprendendoVideoAula1.exe" to "bin\Debug\AprendendoVideoAula1.exe". The process cannot access the file 'bin\Debug\AprendendoVideoAula1.exe' because it is being used by another process. AprendendoVideoAula1
You probably have an instance of your executable running, and with that the OS does not let the compiler overwrite the file. Close all instances of your program, and try again.
– carlosfigueira
It is running the file outside of Visual Studio... when it tries to run by VS, it gives the error indicating the path. See, as @carlosfigueira commented, if there are no instances the same executable running; if there is at least one, and try to run in VS will not work.
– Marco Aurelio