Adrian S
Adrian S

Reputation: 1

Visual Studio 2019 not creating OBJ or BIN folder

So basically I'm trying to create a simple console application. However, whenever I create one instead of seeing the usual run button I am instead greeted to a button that says attach so I read through forum after forum and I found out that I need an OBJ and a Bin folder. So I looked through my solution and found that I have no bin or obj folder created. So I tried to make a new solution however in this new solution again there is no bin or obj folder. I honestly don't know what to do anymore. Here are some images:

enter image description here enter image description here

Upvotes: 0

Views: 8404

Answers (4)

Roman Semenov
Roman Semenov

Reputation: 1

You may have been building a console app that can run on .NET Core and you just don't have the NuGet packages installed. Then you need to either install the appropriate packages or create a console application (.Net Framework)

Upvotes: 0

Bulbasheen
Bulbasheen

Reputation: 1

It's probably likely that there is an issue with dotnet on your path variable. Go to your system variables and add C:\Program Files\dotnet\ to path. It should fix the issue if you had the same problem as me.

Upvotes: 0

Caius Jard
Caius Jard

Reputation: 74660

The process should look something like this:

enter image description here

Upvotes: 0

Bent Tranberg
Bent Tranberg

Reputation: 3470

Make sure you are actually creating a solution in Visual Studio. The straightforward way to do that is to use File / New / Project... in the menu. Then you will likely have a dialog box, and there you need to find Console Application - C#. Then type your project and solution name - it's ok if they're the same name. Then save. That's all.

Do not use the menu to open Program.cs or other files in your solution, once your solution is created. Use the Solution Explorer, and click on the file you want to see. If you don't see the Solution Explorer, use View / Solution Explorer in the menu.

Later, when you want to reopen your solution, use File / Open / Project/Solution... in the menu, and open your solution file, whose name ends with .sln Or even easier, look in File / Recent Projects and Solutions.

You will likely want to add more source files to your projects very soon, so I'll tell you how to do that too. In the Solution Explorer, right click on the project (not the solution), and in the popup menu, point at Add and then New Item... to get a dialog, then choose Class - C#. Type the name of the file while keeping the extension .cs, and then Add it.

Upvotes: 2

Related Questions