-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Do the .net standard versions of NSwag.AspNetCore need to reference System.Xml.XPath.XDocument? #3279
Comments
I think its coming from this reference path: NSwag => NJsonSchema => Namotion.Reflection (XML Docs reading) So in some target frameworks it's actually needed for correct XML Docs reading. Or isnt this referencing the packages you are talking about? |
Hi, I'm talking about the direct package reference from the NSwag.AspNetCore Nuget package: The Namotion.Reflection package doesn't appear to directly depend on any separate XML packages (it only uses things from System.Xml that are built into .NET or via .NETStandard I assume?) The MS documentation for the separate System.Xml.XPath.XDocument package that I was looking at suggested that it contains some extension methods for XDocument and such, and didn't appear be actually be called by the AspNetCore library. |
I think one of the libs use xpath via reflection i think it is xml docs) and having it here loads it in some scenarios which would otherwise fail. Whats the problem with that? |
Not a problem as such, just a thought that came out of me spending time recently trying to reduce package dependencies in things and trying to reduce transient package references to old versions of System.Text.RegularExpressions, which Whitesource likes to moan about. I hadn't considered reflection based calls (though removing the reference didn't cause any unit test failures when I tried it locally), but that's why I opened a question instead of a PR. |
I think for .NET Core > 2 there is no problem, it's more for for legacy runtimes where this might be needed (if I remember correctly). |
It looks like #3366 has removed both |
Hi,
A question / observation after looking at #3268 and spending some time recently reducing package references in things, where I might be missing something obvious, but it case:
The .NETStandard (1.6 and 2.0) nuget packages for NSwag.AspNetCore reference the System.Xml.XPath.XDocument package (The .NET 4.5.1 version doesn't).
I was looking at that and wondering if the 2.0 target at least needed that reference as I thought it might be built in to that version, but then looking at the build I don't actually see it used anywhere - at least, if I remove the reference from the .csproj file then it still builds and the deps.json file produced by the build doesn't list it (which I take to mean there are no indirect references either).
So - is the reference used by something else, or could it be removed?
Thanks.
The text was updated successfully, but these errors were encountered: