Profiling: Error out in the editor if added to unsuported platform
bruno-garcia opened this issue · 3 comments
Set Up is quite complex:
In some platforms you need Sentry.Profiling
in some you don't and others neither are supported
We have series of notes and warnings, and tabs:
Ideally we have a compiler error if Sentry.Profiling
is added to an unsupported version, so it's clear Sentry.Profiling
isn't supported on Android
Customers are copying the snippet and adding both packages without picking on the fine print and having a bad experience during set up.
Can we do that with a bit of MSBuild magic? Can we pick up the targeted platform there together with what packages are installed?
@jamescrosswell raised a good point: We could put the platform specific options behind guards like we do here
sentry-dotnet/src/Sentry/SentryOptions.cs
Lines 26 to 28 in a8859d8
Can we do that with a bit of MSBuild magic? Can we pick up the targeted platform there together with what packages are installed?
this should do the trick 🤞 https://github.com/getsentry/sentry-dotnet/pull/3371/files