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

Adding a net471 target to the nuget #230

Closed
kevingosse opened this issue Feb 16, 2019 · 2 comments
Closed

Adding a net471 target to the nuget #230

kevingosse opened this issue Feb 16, 2019 · 2 comments

Comments

@kevingosse
Copy link
Contributor

kevingosse commented Feb 16, 2019

Currently, the nuget is published with two targets: net452 and netstandard2.0. Since RuntimeInformation is not supported prior to .net 4.7.1, the DataTarget always assumes it's running on Windows when compiled for net452:

https://github.com/Microsoft/clrmd/blob/e0e1d97ba82277701504733a5f0e0d23d1a1196a/src/Microsoft.Diagnostics.Runtime/src/DataTargets/DataTarget.cs#L25-L33

For various reasons, I have a library that needs to target .net framework but that I also use on Linux. Unfortunately, when resolving a PackageReference for a .net framework project, nuget always picks the netxxx target over netstandardxx (dotnet/sdk#1791). Because of this, my library picks the net452 version of ClrMD and crashes on Linux (even though it would work just fine with the netstandard2.0 version).

Since I don't see this issue been fixed in nuget anytime soon, would it be possible to add a net471 target to the ClrMD nuget package? This way, a project targeting .net 4.7.1+ would resolve the ClrMD assembly with the OS check.

@leculver
Copy link
Contributor

leculver commented Feb 18, 2019

Full disclosure: I've spent most of my career working in diagnostics, debugging, and C++/assembly... When it comes to deep issues related to our build systems, targeting, and what the "Right Solution" should be here...I'm actually out of my technical depth with these kinds of issues and don't mind admitting it. =)

To answer your direct question: If adding a 471 target is the right thing to do here to unblock you, and it won't cause adverse affects for other folks, I'm 100% happy to go do that.

With that said, I'm not really qualified to know if that's the right thing for ClrMD or if that's going to have any averse effects on people who target ClrMD "regularly" and get surprised by new/changed behavior. Let me check with some devs in CLR who are more well versed in this area and make sure this will be an okay thing to do.

Can I impose on you to submit a pull request for it? I'm not sure when I can get to it otherwise (I'm off ClrMD for a short while working on an extremely high priority project). If there's a PR here and I get the ok from someone from our team, I will ship it whenever the 1.0.4 release goes out the door.

@leculver
Copy link
Contributor

leculver commented Dec 3, 2019

This will be fixed in ClrMD 2.0. The library will target .Net Standard 2.0 and 4.7.1.

@leculver leculver closed this as completed Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants