getsentry / getsentry/sentry-dotnet

Find alternative to `before.Sentry.sln.targets`

Open
#1,044 2 comments 0 reactions 1 assignee Claimed by @jamescrosswell View on GitHub
.NET Repository Maintenance Task
Dominant language
C#
Stars
770
Forks
248
Avg merge
3d 4h
Merged PRs (30d)
49

Description

In order to restore `git submodule` before running the first build through `dotnet build`, ideally we'd hook into `ValidateSolutionConfiguration`. That wasn't possible (see https://github.com/dotnet/msbuild/issues/6452) so as a work around we added [before.Sentry.sln.targets](https://github.com/getsentry/sentry-dotnet/blob/main/before.Sentry.sln.targets) to the repo.

## Attempt 1: Replace `before.Sentry.sln.targets` with `ValidateSolutionConfiguration`

We tried replacing `before.Sentry.sln.targets` with `ValidateSolutionConfiguration` in the root `Directory.Build.targets`:

```xml

```
...but that [didn't work](https://github.com/getsentry/sentry-dotnet/issues/1044#issuecomment-4474511646).

## Other ideas

We could potentially try the [submodule.recurse](https://git-scm.com/docs/git-config#Documentation/git-config.txt-submodulerecurse) git config option instead.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.