alexandre-spieser / mongodb-generic-repository

An example of generic repository implementation using the MongoDB C# Sharp 2.0 driver (async)
MIT License
315 stars 87 forks source link

Fix Nuget package #27

Closed nuclear1989 closed 4 years ago

nuclear1989 commented 4 years ago

Hello,

The nuget package you are building and publishing on nuget.org contains a bunch of thirdparty dependencies inside of it. The right way is to create a nuget package with your assemblies in it ONLY and utilizing the nuspec file to specify what specific versions of third party dependencies your package works with and letting nuget.exe CLI do the magic for people consuming this package.

Does this make sense?

alexandre-spieser commented 4 years ago

Hello, thanks for letting me know. Yes you're right, I've just had a look at the package and it seems to be the issue only with net452, the netstandard1.5 and netstandard2.0 folder do not have those third party packages. I'll republish the package later today.

TraGicCode commented 4 years ago

Hey @alexandre-spieser ,

That is great news. If you need help let me know but you should be able to look at what other popular nuget packages are doing that depend on OTHER nuget packages

NServiceBus.NLog....etc

alexandre-spieser commented 4 years ago

Just pushed it

Install-Package MongoDbGenericRepository -Version 1.4.2

Please let me know if it's ok for you 👍

alexandre-spieser commented 4 years ago

Pushed 1.4.3 with an even more specific .nuspec content:

<dependencies>
    <group targetFramework=".NETFramework4.5.2">
      <dependency id="MongoDB.Driver" version="2.9.3" exclude="Build,Analyzers" />
    </group>
    <group targetFramework=".NETStandard1.5">
      <dependency id="MongoDB.Driver" version="2.9.3" exclude="Build,Analyzers"  />
    </group>
    <group targetFramework=".NETStandard2.0">
      <dependency id="MongoDB.Driver" version="2.9.3" exclude="Build,Analyzers"/>
    </group>
</dependencies>
TraGicCode commented 4 years ago

Sorry for not getting back with u. Everything worked as expected with the fix u applied