Brand new to C# (but not programming) and can’t get “hello world” to compile

I am trying to start learning C# but having a major issue that I can't seem to resolve. I created the obligatory "hello world" but I can't even get it to compile. I have searched all over and can't find any information on the error message I am getting, and I thought maybe someone here would know what is up.

Here is the link showing the problem.

Here is my code:

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HelloWorld { class Program { static void Main(string[] args) { Console.WriteLine("Hello World"); } } } 

And the error is :

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3812,5): warning MSB3026: Could not copy "obj\Debug\HelloWorld.exe" to "bin\Debug\HelloWorld.exe". Beginning retry 1 in 1000ms. The process cannot access the file 'bin\Debug\HelloWorld.exe' because it is being used by another process.

Obviously most of the code is just boilerplate from choosing create a console application. Right now I am using Visual Studio Express 2015, however I was getting the same issue in Visual Studio Community 2015. I have uninstalled and reinstalled both twice (took FOREVER), and I am getting the same thing.

Finally, I am hitting ctrl + f5 to try and run it ("Start with out debug"). I have no idea what I am doing wrong here.

by johny5w via /r/csharp

Leave a Reply