Skip to content

Dependency on Mono.Unix breaks .NET Framework 4.6.1 support #220

Closed

Description

@fdmarc

I'm trying to upgrade from version 8 to 9 but I'm blocked by the new dependency on Mono.Unix.

https://www.nuget.org/packages/DogStatsD-CSharp-Client shows support for:

  • NETCoreApp 3.1
  • .NETFramework 4.6.1
  • .NETStandard 2.0
  • net6.0

Meanwhile https://www.nuget.org/packages/Mono.Unix/ supports

  • .NETCoreApp 3.1
  • .NETFramework 4.5
  • .NETStandard 2.0
  • .NETStandard 2.1
  • net6.0

I'm on .NETFramework 4.6.1, and I can't install DogStatsD 9, since .NETFramework 4.6.1 is not in the intersection of those two sets.

12:41:27|NUGET|INFOR| Attempting to resolve dependencies for package 'DogStatsD-CSharp-Client.9.0.0' with DependencyBehavior 'Lowest'
12:41:27|RIDER|ERROR| Unable to resolve dependency 'Mono.Unix'. Source(s) used: 'Flipdish', 'Flipdish.Messaging.Contracts', 'Flipdish.SREToolbox', 'nuget.org', 'Microsoft Visual Studio Offline Packages'.
System.InvalidOperationException: Unable to resolve dependency 'Mono.Unix'. Source(s) used: 'Flipdish', 'Flipdish.Messaging.Contracts', 'Flipdish.SREToolbox', 'nuget.org', 'Microsoft Visual Studio Offline Packages'.
 ---> NuGet.Resolver.NuGetResolverConstraintException: Unable to resolve dependency 'Mono.Unix'. Source(s) used: 'Flipdish', 'Flipdish.Messaging.Contracts', 'Flipdish.SREToolbox', 'nuget.org', 'Microsoft Visual Studio Offline Packages'.
   at NuGet.Resolver.PackageResolver.Resolve(PackageResolverContext context, CancellationToken token)
   at NuGet.PackageManagement.NuGetPackageManager.PreviewInstallPackageAsync(NuGetProject nuGetProject, PackageIdentity packageIdentity, ResolutionContext resolutionContext, INuGetProjectContext nuGetProjectContext, IEnumerable`1 primarySources, IEnumerable`1 secondarySources, VersionRange versionRange, CancellationToken token)
   --- End of inner exception stack trace ---
   at NuGet.PackageManagement.NuGetPackageManager.PreviewInstallPackageAsync(NuGetProject nuGetProject, PackageIdentity packageIdentity, ResolutionContext resolutionContext, INuGetProjectContext nuGetProjectContext, IEnumerable`1 primarySources, IEnumerable`1 secondarySources, VersionRange versionRange, CancellationToken token)
   at NuGet.PackageManagement.NuGetPackageManager.PreviewInstallPackageAsync(NuGetProject nuGetProject, PackageIdentity packageIdentity, ResolutionContext resolutionContext, INuGetProjectContext nuGetProjectContext, IEnumerable`1 primarySources, IEnumerable`1 secondarySources, CancellationToken token)
   at NuGet.PackageManagement.NuGetPackageManager.InstallPackageAsync(NuGetProject nuGetProject, PackageIdentity packageIdentity, ResolutionContext resolutionContext, INuGetProjectContext nuGetProjectContext, PackageDownloadContext downloadContext, IEnumerable`1 primarySources, IEnumerable`1 secondarySources, CancellationToken token)
   at NuGet.PackageManagement.NuGetPackageManager.InstallPackageAsync(NuGetProject nuGetProject, PackageIdentity packageIdentity, ResolutionContext resolutionContext, INuGetProjectContext nuGetProjectContext, IEnumerable`1 primarySources, IEnumerable`1 secondarySources, CancellationToken token)
   at JetBrains.ProjectModel.NuGet.Operations.NuGetInstallOperation.<>c__DisplayClass7_0.<<InstallAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at JetBrains.ProjectModel.NuGet.Operations.NuGetInstallOperation.InstallInternal(IProject project, String packageId, String packgeUserStr, NuGetFeedContext feedContext, Int32 nestedLevel, NuGetNotificationMode mode, NuGetOperationReporter reporter, Func`3 nativeInstall, NuGetProject givenNuGetProject)
NuGet.Resolver.NuGetResolverConstraintException: Unable to resolve dependency 'Mono.Unix'. Source(s) used: 'Flipdish', 'Flipdish.Messaging.Contracts', 'Flipdish.SREToolbox', 'nuget.org', 'Microsoft Visual Studio Offline Packages'.
   at NuGet.Resolver.PackageResolver.Resolve(PackageResolverContext context, CancellationToken token)
   at NuGet.PackageManagement.NuGetPackageManager.PreviewInstallPackageAsync(NuGetProject nuGetProject, PackageIdentity packageIdentity, ResolutionContext resolutionContext, INuGetProjectContext nuGetProjectContext, IEnumerable`1 primarySources, IEnumerable`1 secondarySources, VersionRange versionRange, CancellationToken token)

12:41:27|RIDER|ERROR| [Notification][Install] Install failed (project: Flipdish.API, package: DogStatsD-CSharp-Client v9.0.0)
Unable to resolve dependency 'Mono.Unix'. Source(s) used: 'Flipdish', 'Flipdish.Messaging.Contracts', 'Flipdish.SREToolbox', 'nuget.org', 'Microsoft Visual Studio Offline Packages'.

Activity

  1. lucaspimentel commented on Nov 24, 2025

    @lucaspimentel
    Member

    Hey, @fdmarc. That seems strange. Mono.Unix's target for .NET Framework 4.5 which should cover all versions of .NET Framework 4.5 and above, including .NET Framework 4.6.1.


    Ah, I think I see the issue. All versions of Mono.Unix are considered pre-releases by NuGet because they have a version suffix like 7.1.0-final.1.21458.1: https://www.nuget.org/packages/Mono.Unix/#versions-body-tab

    Your build process may be excluding pre-release packages by default, which means there are no Mono.Unix packages available since all of them are pre-release versions.

  2. lucaspimentel commented on Nov 24, 2025

    @lucaspimentel
    Member

    If this is the case, the short-term workaround is to enable pre-release NuGet packages in your build, if possible.

    For a better fix, I think we can remove the Mono.Unix dependency on .NET Framework since we only use it on Linux.

  3. fdmarc commented on Nov 24, 2025

    @fdmarc
    Author

    Thanks @lucaspimentel

    I'd like to avoid enabling pre-release Nugets from being installed by my team here, to prevent people from accidentally depending on something untested.

    I've logged this issue to see if we can it fixed upstream mono/mono.posix#73

  4. lucaspimentel commented on Nov 25, 2025

    @lucaspimentel
    Member

    @fdmarc the Mono.Unix nuget package hasn't been updated since 2021, so I'm not hopeful. We're going to explore other options to remove our dependency on Mono.Unix. It should be straight-forward on .NET Framework at least, since it's not used at all there 😅

  5. fdmarc commented on Nov 26, 2025

    @fdmarc
    Author

    True, but there is activity on the repo this week:

    Image

    It might be all automated commits though.

  6. Jeripy commented on Jan 15, 2026

    @Jeripy

    @fdmarc the Mono.Unix nuget package hasn't been updated since 2021, so I'm not hopeful. We're going to explore other options to remove our dependency on Mono.Unix. It should be straight-forward on .NET Framework at least, since it's not used at all there 😅

    Are there any updates on this issue, we can't upgrade for the same reason?

  7. fdmarc commented on May 27, 2026

    @fdmarc
    Author

    Hi @lucaspimentel any update on this issue please?

  8. lucaspimentel commented on Jun 3, 2026

    @lucaspimentel
    Member

    Sorry, team. I had started draft PR #223 to fix this issue back in January and it dropped off my radar after I had to switch to a different task. I updated the PR yesterday with a much simpler fix that what I original had tried. I expect to merge it very soon and push out a new release to nuget.

  9. linked a pull request that will close this issueRemove `Mono.Unix` dependency #223on Jun 3, 2026
  10. self-assigned this
    on Jun 3, 2026
  11. added a commit that references this issue on Jun 4, 2026
  12. lucaspimentel commented on Jun 4, 2026

    @lucaspimentel
    Member

    @fdmarc @Jeripy The PR linked above is merged. It removes the dependency on the Mono.Unix nuget package. This change will rollout with the next release of the DogStatsD-CSharp-Client nuget package.

  13. atanzu commented on Jun 10, 2026

    @atanzu
    Contributor

    Hi all, we've released 9.2.0 where this dependency is removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions