Coder Social home page Coder Social logo

Comments (6)

sandersaares avatar sandersaares commented on May 19, 2024

Thank you for the report! This is indeed undesirable.

I have published new preview packages containing the fix. They should show up in the NuGet feed shortly with the version string 2.0.0-pre-003009-4e26344.

from prometheus-net.

godefroi avatar godefroi commented on May 19, 2024

I have updated to the version you referenced, and I still get all the files. I am not sure, but is it because of how you're packaging the NuGet library? The NuGet package has a lib\netstandard2.0 folder, but not a lib\net40 like I would expect.

from prometheus-net.

godefroi avatar godefroi commented on May 19, 2024

@sandersaares I'm not sure you get notified if it's closed?

from prometheus-net.

sandersaares avatar sandersaares commented on May 19, 2024

I do get notified even if closed but no worries - ping by name is always safer!

I interpreted the issue as "many NuGet packages are installed into my project as dependencies after installing prometheus-net". Perhaps I read too far into the meaning.

Such NuGet dependencies used to be necessary for .NET SDK/packaging reasons but it appears with with .NET Standard 2.0 they can be eliminated. This is what the commit linked to this issue fixed.

However, as far as I know, the files themselves existing is actually correct - libraries that target .NET Standard will need to target the .NET Standard API contracts which will need to bring in some DLLs for reasons of .NET SDKs/packaging that I have never found a satisfactory explanation for. The reality as I understand it is that the same NuGet packages (or at least some of them) still get installed, they just do not pollute the project's NuGet packages list - the SDK simply installs them silently at runtime when it sees that you are installing a .NET Standard library.

I have seen some rumors that Microsoft plans to fix this with .NET Framework 4.7.2 but only time will tell. At the moment, I believe this is the normal state of things.

from prometheus-net.

godefroi avatar godefroi commented on May 19, 2024

So do I need to deploy all of these with my library? Libraries like System.Threading.dll and System.Drawing.Primitives.dll?

from prometheus-net.

sandersaares avatar sandersaares commented on May 19, 2024

If your library itself is delivered via NuGet, all you need to do is reference prometheus-net in your library's dependencies list and the .NET SDK will automatically ensure that any necessary .NET Standard contract libraries are also present when your library is installed.

If your library is delivered in via some other mechanism (such as direct file copy) then I would suggest still installing prometheus-net via NuGet in ordrer to ensure correct behavior during installation of dependencies.

These files do need to be present at runtime when whatever final app prometheus-net is installed into is executed.

from prometheus-net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.