feat: Returns better version data than default API#248
Conversation
| <DefineConstants>NET45PLUS_REGISTRY_VERSION;HAS_RUNTIME_INFORMATION;$(AdditionalConstants)</DefineConstants> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup Condition="'$(TargetFramework)' == 'net35' or '$(TargetFramework)' == 'net40' or '$(TargetFramework)' == 'net45'"> |
There was a problem hiding this comment.
The references are not required on .NET 3.5 or 4.0?
There was a problem hiding this comment.
I just moved it to their own blocks as it was tricky to follow what target gets what
| return Type.GetType("Mono.Runtime", false) | ||
| ?.GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static) | ||
| ?.Invoke(null, null) | ||
| is string monoVersion |
There was a problem hiding this comment.
The line breaking here is a bit funky. 😄 Perhaps breaking the expression up a bit would make it more readable as well?
There was a problem hiding this comment.
Ok, did reformat a bit to improve readability.
I do believe it might be about getting used to pattern matching syntax a bit.
|
The Travis build is failing, though? |
* Method call is guarded by runtime check .NET so no need to test directly which fails on Mono
|
Travis failed because I ran the Registry code directly from test (without the IsNetFx guard) and that failed on Mono on Linux. |
See getsentry/sentry#8314 for screenshots