Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Contributor Guide #6127

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,3 +333,55 @@
[EnvironmentVariablesExtensions.cs](./src/Shared/EnvironmentVariables/EnvironmentVariablesExtensions.cs)
for an example of a file copied from another project and attributed in the [3rd
party notices](./THIRD-PARTY-NOTICES.TXT) file.

## Troubleshooting Common Issues

### 1. SDK Version Compatibility Issues

**Problem:**

The project requires a specific SFV version

Check failure on line 343 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / lint-md / run-markdownlint

Trailing spaces

CONTRIBUTING.md:343:44 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md009.md
but developers may download an incompatible version.

**Solution:**

* See [required version here](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/global.json#L4)
* Verify your installed SDK version with:

```sh
dotnet --version
```

If you have an incompatible SDK, download the correct version [here](https://dotnet.microsoft.com/download/dotnet/9.0).

### 2. Build and Test Challenges

#### Version Mismatch Between Assemblies

**Issue:** CS1705 version conflict when referencing OpenTelemetry.Api package.

**Fix:**
Ensure dependencies are updated by running:

```sh
dotnet restore
```

If the issue persists, force-reinstall dependencies:

```sh
dotnet nuget locals all --clear
dotnet restore
```

#### Dynamically Referenced Packages Causing Compatibility Problems

**Solution:**

* Ensure your `global.json` file correctly specifies
the required SDK version.
* If using multiple SDK versions, use `dotnet --list-sdks`
to confirm correct installation.
* Consider using a virtual environment or containerized build system
to maintain a consistent development environment.

Loading