Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/dotnet/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "dotnet",
"version": "2.4.0",
"version": "2.4.1",
"name": "Dotnet CLI",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet",
"description": "This Feature installs the latest .NET SDK, which includes the .NET CLI and the shared runtime. Options are provided to choose a different version or additional versions.",
Expand Down Expand Up @@ -45,7 +45,7 @@
},
"containerEnv": {
"DOTNET_ROOT": "/usr/share/dotnet",
"PATH": "$PATH:$DOTNET_ROOT:~/.dotnet/tools",
"PATH": "$PATH:$DOTNET_ROOT",
"DOTNET_RUNNING_IN_CONTAINER": "true",
"DOTNET_USE_POLLING_FILE_WATCHER": "true"
},
Expand Down
7 changes: 7 additions & 0 deletions src/dotnet/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ if [ ! -e /usr/bin/dotnet ]; then
ln --symbolic "$DOTNET_ROOT/dotnet" /usr/bin/dotnet
fi

# Add .NET Core SDK tools to PATH for bash and zsh users
# This is where 'dotnet tool install --global <tool>' installs tools to
# Use single-quoted EOF to defer $PATH expansion until sourcing the file
cat << 'EOF' >> /etc/profile.d/dotnet.sh
export PATH="$PATH:$HOME/.dotnet/tools"
EOF

# Clean up
rm -rf /var/lib/apt/lists/*
rm -rf scripts
Expand Down