# DotNet Core App 8

# **\[1\] Create C# Project in Replit**

refer [https://hashnotes.hashnode.dev/dotnet-core-app](https://hashnotes.hashnode.dev/dotnet-core-app)

# **\[2\] Update basic files**

## \[2.1\] .replit files

```plaintext
entrypoint = "main.cs"
hidden = ["bin", "obj"]
modules = ["dotnet-8.0"]

[env]
DOTNET_NOLOGO = "1"
DOTNET_CLI_TELEMETRY_OPTOUT = "1"
DOTNET_CLI_HOME = "$XDG_CACHE_HOME"

[gitHubImport]
requiredFiles = [".replit", "replit.nix"]

[nix]
channel = "stable-24_05"

[deployment]
run = ["dotnet", "run"]
deploymentTarget = "cloudrun"
```

## \[2.2\] main.csproj file

```plaintext
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <StartupObject>Program</StartupObject>
  </PropertyGroup>

</Project>
```

## \[2.3\] main.cs file

```plaintext
using System;

class Program {
  public static void Main (string[] args) {
    Console.WriteLine ("Hello World");
  }
}
```

## Preview

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1747056812275/6588e5e1-bd6d-419d-a6d7-a0884fc260aa.png align="center")
