Skip to content

Commit a2d4b8c

Browse files
committed
CC-1541: Update .NET version to 9.0
1 parent b29a1bc commit a2d4b8c

File tree

9 files changed

+27
-10
lines changed

9 files changed

+27
-10
lines changed

compiled_starters/csharp/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Time to move on to the next stage!
3030

3131
Note: This section is for stages 2 and beyond.
3232

33-
1. Ensure you have `dotnet (8.0)` installed locally
33+
1. Ensure you have `dotnet (9.0)` installed locally
3434
1. Run `./your_program.sh` to run your program, which is implemented in
3535
`src/Server.cs`.
3636
1. Commit your changes and run `git push origin master` to submit your solution

compiled_starters/csharp/codecrafters-http-server.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net9.0</TargetFramework>
66
<RootNamespace>codecrafters_http_server</RootNamespace>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<Nullable>enable</Nullable>

compiled_starters/csharp/codecrafters.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ debug: false
77
# Use this to change the C# version used to run your code
88
# on Codecrafters.
99
#
10-
# Available versions: dotnet-8.0
11-
language_pack: dotnet-8.0
10+
# Available versions: dotnet-9.0
11+
language_pack: dotnet-9.0

dockerfiles/dotnet-9.0.Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# syntax=docker/dockerfile:1.7-labs
2+
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine
3+
4+
WORKDIR /app
5+
6+
# Re-build image if any of these files change
7+
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="codecrafters-redis.csproj,codecrafters-redis.sln"
8+
9+
# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses
10+
COPY --exclude=.git --exclude=README.md . /app
11+
12+
# This saves nuget packages to ~/.nuget
13+
RUN dotnet build --configuration Release .
14+
15+
# Legacy support, remove in the next version of this dockerfile
16+
RUN echo "cd \${CODECRAFTERS_REPOSITORY_DIR} && dotnet build --configuration Release ." > /codecrafters-precompile.sh
17+
RUN chmod +x /codecrafters-precompile.sh

solutions/csharp/01-at4/code/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Time to move on to the next stage!
3030

3131
Note: This section is for stages 2 and beyond.
3232

33-
1. Ensure you have `dotnet (8.0)` installed locally
33+
1. Ensure you have `dotnet (9.0)` installed locally
3434
1. Run `./your_program.sh` to run your program, which is implemented in
3535
`src/Server.cs`.
3636
1. Commit your changes and run `git push origin master` to submit your solution

solutions/csharp/01-at4/code/codecrafters-http-server.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net9.0</TargetFramework>
66
<RootNamespace>codecrafters_http_server</RootNamespace>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<Nullable>enable</Nullable>

solutions/csharp/01-at4/code/codecrafters.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ debug: false
77
# Use this to change the C# version used to run your code
88
# on Codecrafters.
99
#
10-
# Available versions: dotnet-8.0
11-
language_pack: dotnet-8.0
10+
# Available versions: dotnet-9.0
11+
language_pack: dotnet-9.0

starter_templates/csharp/code/codecrafters-http-server.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net9.0</TargetFramework>
66
<RootNamespace>codecrafters_http_server</RootNamespace>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<Nullable>enable</Nullable>

starter_templates/csharp/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
attributes:
2-
required_executable: dotnet (8.0)
2+
required_executable: dotnet (9.0)
33
user_editable_file: src/Server.cs

0 commit comments

Comments
 (0)