Inconsistent Runtime dependencies
Our automated nightly build failed last night due to dependency issues with System.Runtime. It seemed as though a push to CIDEV for System.Linq.Queryable depended on a System.Runtime version that was 1 less than the System.Runtime version used by all of the other .NET packages that were pushed to MyGet as part of the rc2-16317 release.
This was causing a version mismatch for our projects which had a dependency on System.Linq.Queryable
To fix the issue, we needed to force the dependencies like so:
"frameworks": {
"net451": { },
"dotnet5.4": {
"dependencies": {
"System.Runtime": "4.0.21-*"
}
This took us quite a while of debugging to identify the cause of the version mismatch - probably need to improve my dependency debugging ninja skills! :-)
My question is, does this happen often? I thought this kind of thing might get picked up by Universe?
Here is some additional troubleshooting info that was compiled by a colleague which abstractly describes our environment:
- project A
- dependency System.Linq.Queryable v.x
- dependency on System.Runtime 4.0.20.x
- project B
- dependency on Project A
- dependency on .net dependency Y (e.g. System.Foo.dll)
- dependency on System.Runtime 4.0.21.x
Project A compiles successfully Project B Fails with error: Project A uses System.Runtime 4.0.21.x which is newer than the referenced System.Runtime 4.0.20.x
Notes: If you go to root directory of Project A and Project B and do dnu build .\root**\project.json - win If you compile Project B only - fail
Workaround:
Ensure that Project A explicitly asks for 4.0.21.x via a project.json
e.g
dotnet5.4 {
"frameworkDependencies": {
"System.Runtime": "4.0.21-*"
}
}
Question:
Should project A need to be configured to make allowances for downstream projects?
@dneimke what are you using to build? MSBuild + nuget.exe should flow references across projects. DNX does the same.
If you're using some other custom build system (eg: dotnet/buildtools) it will not. That's a known shortcoming and something that should be accounted for in the repo. Eventually this will be fixed once we can move dotnet/buildtools to nuget and get an x-plat nuget that supports p2p flow of references. /cc @yishaigalatzer
@dneimke if you can reproduce this problem with the public tools & msbuild then I reccomend opening an issue in http://github.com/nuget/home.