diff --git a/compiled_starters/csharp/README.md b/compiled_starters/csharp/README.md index 8ace2ae..9d7b7e2 100644 --- a/compiled_starters/csharp/README.md +++ b/compiled_starters/csharp/README.md @@ -30,7 +30,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `dotnet (8.0)` installed locally +1. Ensure you have `dotnet (9.0)` installed locally 1. Run `./your_program.sh` to run your program, which is implemented in `src/Server.cs`. 1. Commit your changes and run `git push origin master` to submit your solution diff --git a/compiled_starters/csharp/codecrafters-http-server.csproj b/compiled_starters/csharp/codecrafters-http-server.csproj index 70bd140..5812455 100644 --- a/compiled_starters/csharp/codecrafters-http-server.csproj +++ b/compiled_starters/csharp/codecrafters-http-server.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 codecrafters_http_server enable enable diff --git a/compiled_starters/csharp/codecrafters.yml b/compiled_starters/csharp/codecrafters.yml index 80bc236..a8805bf 100644 --- a/compiled_starters/csharp/codecrafters.yml +++ b/compiled_starters/csharp/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the C# version used to run your code # on Codecrafters. # -# Available versions: dotnet-8.0 -language_pack: dotnet-8.0 +# Available versions: dotnet-9.0 +language_pack: dotnet-9.0 diff --git a/dockerfiles/dotnet-9.0.Dockerfile b/dockerfiles/dotnet-9.0.Dockerfile new file mode 100644 index 0000000..5c1f25c --- /dev/null +++ b/dockerfiles/dotnet-9.0.Dockerfile @@ -0,0 +1,17 @@ +# syntax=docker/dockerfile:1.7-labs +FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine + +WORKDIR /app + +# Re-build image if any of these files change +ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="codecrafters-redis.csproj,codecrafters-redis.sln" + +# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses +COPY --exclude=.git --exclude=README.md . /app + +# This saves nuget packages to ~/.nuget +RUN dotnet build --configuration Release . + +# Legacy support, remove in the next version of this dockerfile +RUN echo "cd \${CODECRAFTERS_REPOSITORY_DIR} && dotnet build --configuration Release ." > /codecrafters-precompile.sh +RUN chmod +x /codecrafters-precompile.sh diff --git a/solutions/csharp/01-at4/code/README.md b/solutions/csharp/01-at4/code/README.md index 8ace2ae..9d7b7e2 100644 --- a/solutions/csharp/01-at4/code/README.md +++ b/solutions/csharp/01-at4/code/README.md @@ -30,7 +30,7 @@ Time to move on to the next stage! Note: This section is for stages 2 and beyond. -1. Ensure you have `dotnet (8.0)` installed locally +1. Ensure you have `dotnet (9.0)` installed locally 1. Run `./your_program.sh` to run your program, which is implemented in `src/Server.cs`. 1. Commit your changes and run `git push origin master` to submit your solution diff --git a/solutions/csharp/01-at4/code/codecrafters-http-server.csproj b/solutions/csharp/01-at4/code/codecrafters-http-server.csproj index 70bd140..5812455 100644 --- a/solutions/csharp/01-at4/code/codecrafters-http-server.csproj +++ b/solutions/csharp/01-at4/code/codecrafters-http-server.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 codecrafters_http_server enable enable diff --git a/solutions/csharp/01-at4/code/codecrafters.yml b/solutions/csharp/01-at4/code/codecrafters.yml index 80bc236..a8805bf 100644 --- a/solutions/csharp/01-at4/code/codecrafters.yml +++ b/solutions/csharp/01-at4/code/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the C# version used to run your code # on Codecrafters. # -# Available versions: dotnet-8.0 -language_pack: dotnet-8.0 +# Available versions: dotnet-9.0 +language_pack: dotnet-9.0 diff --git a/starter_templates/csharp/code/codecrafters-http-server.csproj b/starter_templates/csharp/code/codecrafters-http-server.csproj index 70bd140..5812455 100644 --- a/starter_templates/csharp/code/codecrafters-http-server.csproj +++ b/starter_templates/csharp/code/codecrafters-http-server.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 codecrafters_http_server enable enable diff --git a/starter_templates/csharp/config.yml b/starter_templates/csharp/config.yml index 218ca93..4b585f2 100644 --- a/starter_templates/csharp/config.yml +++ b/starter_templates/csharp/config.yml @@ -1,3 +1,3 @@ attributes: - required_executable: dotnet (8.0) + required_executable: dotnet (9.0) user_editable_file: src/Server.cs