Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"rollForward": false
},
"dotnet-reportgenerator-globaltool": {
"version": "5.4.7",
"version": "5.4.8",
"commands": [
"reportgenerator"
],
Expand Down
23 changes: 20 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@

[*.{cs,vb}]
[
"*.",
{
"cs",
"vb"
}
]
# File header

file_header_template = \n Copyright (c) 2025, Salesforce, Inc.\n SPDX-License-Identifier: Apache-2\n \n Licensed under the Apache License, Version 2.0 (the "License") \n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n
Expand Down Expand Up @@ -112,4 +117,16 @@ csharp_style_prefer_primary_constructors = false:suggestion
csharp_prefer_system_threading_lock = true:suggestion

# Organize usings
dotnet_sort_system_directives_first = true
dotnet_sort_system_directives_first = true

# Enforce Async suffix for async methods
dotnet_naming_rule.async_methods_must_end_with_async.severity = error
dotnet_naming_rule.async_methods_must_end_with_async.symbols = async_methods
dotnet_naming_rule.async_methods_must_end_with_async.style = end_with_async

dotnet_naming_symbols.async_methods.applicable_kinds = method
dotnet_naming_symbols.async_methods.applicable_accessibilities = *
dotnet_naming_symbols.async_methods.required_modifiers = async

dotnet_naming_style.end_with_async.required_suffix = Async
dotnet_naming_style.end_with_async.capitalization = pascal_case
6 changes: 0 additions & 6 deletions .github/.secrets.default

This file was deleted.

36 changes: 0 additions & 36 deletions .github/.vars.default

This file was deleted.

38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

50 changes: 50 additions & 0 deletions .github/actions/clean-dotnet/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Clean .NET Installations
description: 'Remove all existing .NET installations from the system. Does not install any new versions.'

runs:
using: "composite"
steps:
# Step 1: Clean existing .NET installations on Ubuntu/Linux
- name: Clean .NET installations (Ubuntu/Linux)
if: runner.os == 'Linux'
shell: bash
run: |
echo "Cleaning existing .NET installations on Ubuntu/Linux..."
# Remove via package manager
sudo apt-get remove -y --purge dotnet* aspnetcore* netstandard* || true
# Remove installation directories
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /etc/dotnet || true
sudo rm -rf ~/.dotnet || true
echo "✅ Cleaned .NET installations on Ubuntu/Linux"

# Step 2: Clean existing .NET installations on macOS
- name: Clean .NET installations (macOS)
if: runner.os == 'macOS'
shell: bash
run: |
echo "Cleaning existing .NET installations on macOS..."
# Remove installation directories
sudo rm -rf /usr/local/share/dotnet || true
sudo rm -rf ~/.dotnet || true
# Remove brew installed versions if any (suppress error output to avoid annotations)
brew uninstall --ignore-dependencies dotnet 2>/dev/null || true
echo "✅ Cleaned .NET installations on macOS"

# Step 3: Clean existing .NET installations on Windows
- name: Clean .NET installations (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Write-Host "Cleaning existing .NET installations on Windows..."
# Remove via package manager
try {
Get-Package -Name "Microsoft .NET*" | Uninstall-Package -Force -ErrorAction SilentlyContinue
} catch {
Write-Host "No .NET packages found to uninstall"
}
# Remove installation directories
Remove-Item -Path "C:\Program Files\dotnet" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "C:\Program Files (x86)\dotnet" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "$env:USERPROFILE\.dotnet" -Recurse -Force -ErrorAction SilentlyContinue
Write-Host "✅ Cleaned .NET installations on Windows"
47 changes: 36 additions & 11 deletions .github/actions/setup-dotnet/action.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,49 @@
name: Setup .NET
description: 'Setup .NET'
description: 'Setup a specific .NET SDK version and add to PATH. Ensures only the specified version is active.'

inputs:
dotnet-version:
description: 'The .NET SDK version to install (e.g., 8.0.x, 9.0.x).'
required: true

env:
DOTNET_NOLOGO: 'true'
# Prevent global .NET installations from interfering.
# This tells .NET to not look for SDKs/runtimes in global locations.
DOTNET_MULTILEVEL_LOOKUP: "0"

runs:
using: "composite"
steps:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ inputs.dotnet-version }}

- name: nuget Cache
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
path: ~/.nuget/packages # This path is standard for NuGet cache
key: ${{ runner.os }}-nuget-${{ inputs.dotnet-version }}-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-${{ inputs.dotnet-version }}-
${{ runner.os }}-nuget-
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Setup .NET 9.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Verify .NET installation
shell: pwsh
run: |
Write-Host "Verifying .NET installation..."
Write-Host "PATH: $($env:PATH)"
Write-Host "DOTNET_ROOT: $($env:DOTNET_ROOT)" # DOTNET_ROOT is set by setup-dotnet
$dotnetExists = Get-Command dotnet -ErrorAction SilentlyContinue
if (-not $dotnetExists) {
Write-Error "dotnet command could not be found!"
exit 1
}
Write-Host "Running dotnet --info:"
dotnet --info
Write-Host "Running dotnet --list-sdks:"
dotnet --list-sdks
Write-Host "Running dotnet --list-runtimes:"
dotnet --list-runtimes
Write-Host "Successfully set up .NET SDK ${{ inputs.dotnet-version }}"
Loading