adding RuntimeIdentifiers to the fsproj breaks the build
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
I came across some really strange behaviour when using paket and dotnet core together with RuntimeIdentifiers.
Repro steps
Please provide the steps required to reproduce the problem
-
Create a new hello world fsproj
-
add a
RuntimeIdentifierssection to the file:
<RuntimeIdentifiers>ubuntu.16.04-arm;ubuntu.14.04-arm</RuntimeIdentifiers>
-
run
paket install -
run
dotnet build
Expected behavior
build is successful.
Actual behavior
build fails with error message:
/Users/kdummann/source/rubecula/frontend/backend/backend.fsproj : error NU1100: Unable to resolve 'runtime.linux-arm.Microsoft.NETCore.App (>= 2.0.0)' for '.NETCoreApp,Version=v2.0/ubuntu.14.04-arm'.
/Users/kdummann/source/rubecula/frontend/backend/backend.fsproj : error NU1100: Unable to resolve 'runtime.linux-arm.Microsoft.NETCore.DotNetHostPolicy (>= 2.0.0)' for '.NETCoreApp,Version=v2.0/ubuntu.14.04-arm'.
/Users/kdummann/source/rubecula/frontend/backend/backend.fsproj : error NU1100: Unable to resolve 'runtime.linux-arm.Microsoft.NETCore.DotNetHostResolver (>= 2.0.0)' for '.NETCoreApp,Version=v2.0/ubuntu.14.04-arm'.
/Users/kdummann/source/rubecula/frontend/backend/backend.fsproj : error NU1100: Unable to resolve 'runtime.linux-arm.Microsoft.NETCore.DotNetAppHost (>= 2.0.0)' for '.NETCoreApp,Version=v2.0/ubuntu.14.04-arm'.
/Users/kdummann/source/rubecula/frontend/backend/backend.fsproj : error NU1100: Unable to resolve 'runtime.linux-arm.Microsoft.NETCore.App (>= 2.0.0)' for '.NETCoreApp,Version=v2.0/ubuntu.16.04-arm'.
/Users/kdummann/source/rubecula/frontend/backend/backend.fsproj : error NU1100: Unable to resolve 'runtime.linux-arm.Microsoft.NETCore.DotNetHostPolicy (>= 2.0.0)' for '.NETCoreApp,Version=v2.0/ubuntu.16.04-arm'.
/Users/kdummann/source/rubecula/frontend/backend/backend.fsproj : error NU1100: Unable to resolve 'runtime.linux-arm.Microsoft.NETCore.DotNetHostResolver (>= 2.0.0)' for '.NETCoreApp,Version=v2.0/ubuntu.16.04-arm'.
/Users/kdummann/source/rubecula/frontend/backend/backend.fsproj : error NU1100: Unable to resolve 'runtime.linux-arm.Microsoft.NETCore.DotNetAppHost (>= 2.0.0)' for '.NETCoreApp,Version=v2.0/ubuntu.16.04-arm'.
The behaviour is not arm specific it also happens for x64 and x86.
Known workarounds
do not use paket to do nuget handling. Simply removing the restore targets file from the fsproj file is enough. Run dotnet restore or dotnet build. Then add the paket restore targets again and everything works. This seems to fix it for the whole machine. The problem is more in CI where we run each build in a new container and as a workaround have to run dotnet restore in a dummy project to get the code building.
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.
Research direction
Start with the hello-world .fsproj and its Paket restore targets file, then reproduce the issue with paket install followed by dotnet build using the listed RuntimeIdentifiers. Compare this with the successful dotnet restore workaround. Done means the project builds through Paket without the NU1100 errors for the listed runtimes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100