Comments (6)
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.
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.
Thanks for that reference.
It seems you are right, I'll change the dependencies in the next version.
from pather.csharp.
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
orNetStandard.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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pather.csharp.