-
Notifications
You must be signed in to change notification settings - Fork 205
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
Add net461 as a separate target for Elastic.Apm #277
Conversation
@@ -39,7 +39,7 @@ static ElasticApmModule() | |||
private HttpApplication _httpApp; | |||
|
|||
private static Version AspNetVersion => typeof(HttpRuntime).Assembly.GetName().Version; | |||
private static string ClrDescription => RuntimeInformation.FrameworkDescription; | |||
private static string ClrDescription => "aaa"; // RuntimeInformation.FrameworkDescription; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix is already on @SergeyKleyman's machine.
As I want to validate whether the GH notification checks are fine, I'll say |
Codecov Report
@@ Coverage Diff @@
## master #277 +/- ##
==========================================
+ Coverage 79.57% 79.84% +0.26%
==========================================
Files 71 71
Lines 2326 2287 -39
Branches 417 411 -6
==========================================
- Hits 1851 1826 -25
+ Misses 300 283 -17
- Partials 175 178 +3
Continue to review full report at Codecov.
|
…ption in ElasticApmModule.cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merging this. ❗️ Very important ❗️ |
#248 seems to break our Full Framework code, mainly because it adds
System.Diagnostics.PerformanceCounter
as a dependency toElastic.Apm
. We use thePerformanceCounter
type from this package, but it turns out that this type is inSystem.dll
in case ofnet461
. The problem itself isn't specific to this class, I suspect we'd have this later with other things (so as a quick and sloppy summary: usingnetstandard2.0
onnet461
is a pain,net461
should be a separate target, and that's what this PR proposes).The recommendation from Microsoft is also to target
net461
andnetstandard2.0
separately.Current problems/questions:
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
toElastic.Apm
builds will fail on Linux (CI) and macOS (my dev machine). Therefore I added<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">
checks to only buildnet461
on Windows. I'm not 100% sure this is a good idea, because in this case the generated NuGet packages contain an additionalnet461
dll on Windows, but those are missing when we generate the packages on a non Windows OSs. I think this is very dangerous, because we may end up with a release where thenet461
Elastic.Apm
dll is missing. Open for ideas on how to solve this, otherwise we can go with this and think about it later.@SergeyKleyman feel free to push your fix to the
RuntimeInformation.FrameworkDescription
issue.