Code Monkey home page Code Monkey logo

Comments (6)

Domysee avatar Domysee commented on August 21, 2024

Referencing it makes development easier, since I don't have to look for packages to get features that were there by default in "normal" .Net development.
But this shouldn't be an issue, your code should not have to change because of it.
Can you elaborate a bit on what you are doing and why you end up with so many changed files?

from pather.csharp.

ms007 avatar ms007 commented on August 21, 2024

We do commit our packages directory and the changed files are mainly from the packages directory.

I've read here that the NETStandard library package should not be referenced by libraries.

It's worth noting that the NETStandard.Library package will typically be referenced by projects, though not by libraries.

but I have to confess that my knowledge about Net Standard is modest and I don't know what the best practices are.

from pather.csharp.

Domysee avatar Domysee commented on August 21, 2024

Thanks for that reference.
It seems you are right, I'll change the dependencies in the next version.

from pather.csharp.

Domysee avatar Domysee commented on August 21, 2024

This issue is now fixed with version 2.0.4.
Just if anybody is interested, it seems that Microsoft wants to push the NETStandard.Library package. As described in the csproj reference, the package is implicitly referenced:

Since Microsoft.NETCore.App or NetStandard.Library metapackages are implicitly referenced, ...

However, I still agree that referencing as little as possible is the way to go.

It is possible to disable that implicit reference by adding a DisableImplicitFrameworkReferences element with True as content, as I have now done, but it is not documented in that docs page.
If found that on a Stackoverflow question and then a bit more information on a ticket on the dotnet sdk.

from pather.csharp.

dsplaisted avatar dsplaisted commented on August 21, 2024

You could disable the NETStandard.Library dependency from being included as a dependency of your NuGet package without disabling the implicit reference entirely with the following:

<ItemGroup>
    <PackageReference Update="NETStandard.Library" PrivateAssets="true" />
</ItemGroup>

This will happen automatically when targeting .NET Standard 2.0 or higher: dotnet/sdk#1171

from pather.csharp.

Domysee avatar Domysee commented on August 21, 2024

Thank you, @dsplaisted, this way seems more straightforward.
But is there any difference to using DisableImplicitFrameworkReferences?

from pather.csharp.

Related Issues (7)

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.