# Inside a Project Folder — .NET Core: Build, Test and Ship Web APIs

Source: https://www.geekswithgeeks.com/en/dotnet-core/dotnet-project-structure

> Read a .csproj and Program.cs and know what bin and obj hold.

## The .csproj file

The `.csproj` is a small XML file describing the project: target framework, output type and NuGet packages. You rarely list source files; everything under the folder is included.

## A minimal project file

`Nullable` turns on null-safety warnings and `ImplicitUsings` adds common `using` lines for you.

```xml
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net10.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>
</Project>
```

## Never commit bin and obj

`bin/` holds build output and `obj/` holds intermediate files. Both are regenerated, so add them to `.gitignore`. `dotnet new gitignore` creates a ready-made file.

**Quiz:** What does the obj folder contain?

- [ ] Your hand-written source code
- [x] Intermediate build files
- [ ] User settings secrets
- [ ] Database migrations

*Answer:* Intermediate build files. It holds generated intermediate files and restore results, safe to delete and regenerate.
