我有一个用C#语言(Visual Studio 2013)编写的简单控制台应用程序:
using System;
using System.Collections.Generic;
using System.Text;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
Console.ReadKey();
}
}
}
当我按下F5或点击启动按钮时,我的项目已构建但未启动。有时,输出窗口会显示以下内容:
Error 12 Could not copy "obj\Debug\HelloWorld.exe" to "bin\Debug\HelloWorld.exe". Exceeded retry count of 10. Failed.
Error 13 Unable to copy file "obj\Debug\HelloWorld.exe" to "bin\Debug\HelloWorld.exe". The process cannot access the file 'bin\Debug\HelloWorld.exe' because it is being used by another process.
但是当我编写Windows窗体应用程序时,我的项目可以正常构建和启动?为什么?如何解决这个问题?