Mono.Unix dependency is declared for net462/net48 builds too, not just netstandard2.0
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- csharp
- Domain
- build-system
Research direction
Locate SIL.Core's own .csproj and inspect how its PackageReference items are conditioned across the target frameworks. Build or package SIL.Core, then inspect the generated nuspec: Mono.Unix should remain only in the netstandard2.0 dependency group and be absent from the .NETFramework4.6.2 and .NETFramework4.8 groups.
Written by the indexing model from the issue text.
Description
Summary
SIL.Core's published nuspec declares a dependency on Mono.Unix identically across all three target-framework dependency groups — .NETFramework4.6.2, .NETFramework4.8, and .NETStandard2.0 — even though the POSIX interop it provides is presumably only ever exercised on Linux via the netstandard2.0 build. From SIL.Core 17.0.0's nuspec:
<group targetFramework=".NETFramework4.6.2">
...
<dependency id="Mono.Unix" version="7.1.0-final.1.21458.1" exclude="Build,Analyzers" />
...
</group>
<group targetFramework=".NETFramework4.8">
...
<dependency id="Mono.Unix" version="7.1.0-final.1.21458.1" exclude="Build,Analyzers" />
...
</group>
<group targetFramework=".NETStandard2.0">
...
<dependency id="Mono.Unix" version="7.1.0-final.1.21458.1" exclude="Build,Analyzers" />
...
</group>
Why this matters
Mono.Unix has never had a genuinely stable NuGet release — every version ever published (including the "final" ones) carries a hyphenated suffix (e.g. 7.1.0-final.1.21458.1), which NuGet's semver parsing treats as prerelease regardless of the label. Consumers restoring via classic nuget.exe install without -Prerelease (packages.config-style restore) get "Unable to resolve dependency 'Mono.Unix'" and fail outright.
Because the dependency is declared for the .NETFramework4.6.2/.NETFramework4.8 groups too, this breaks restore for Windows-only, .NET-Framework-only consumers that never touch the Linux/netstandard2.0 build at all and have no actual runtime need for POSIX interop. This is exactly what happened downstream in sillsdev/SIL.BuildTasks#88 — SIL.BuildTasks (an MSBuild-tasks-only package with net472/netstandard2.0 targets) picked up SIL.Core 17.0.0 and broke restore for Bloom, a Windows-only consumer, purely because of this transitive dependency edge.
Suggested fix
Scope the Mono.Unix PackageReference in SIL.Core's own .csproj to only the netstandard2.0 target, e.g.:
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Mono.Unix" Version="7.1.0-final.1.21458.1" />
</ItemGroup>
That would drop it from the .NETFramework4.6.2/.NETFramework4.8 dependency groups in the generated nuspec entirely, so any net46x/net48-only consumer stops needing to resolve it — without changing anything for netstandard2.0/Linux consumers, who would still need it (and would still need to work around its prerelease-only status some other way, which is a separate, harder problem this issue doesn't attempt to solve).
- Dominant language
- C#
- Stars
- 46
- Forks
- 50
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 7
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sillsdev/libpalaso
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in sillsdev/libpalaso
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·