When running a dotnet restore --locked-mode from a linux environment where dotnet restore --force-evaluate was run on windows it fails. This makes things very difficult to test cross platform. (Build on a linux agent then run tests on windows). Note: it happens either way (lockfile generate on linux causes windows to fail)
NuGet product used: dotnet.exe
NuGet version (x.x.x.xxx):
โฏ dotnet nuget --version
NuGet Command Line
5.4.0.2
dotnet.exe --version (if appropriate):
โฏ dotnet --version
3.1.102
OS version (i.e. win10 v1607 (14393.321)): Windows 10 Enterprise: 10.0.18363 and Ubuntu 18..04 (WSL in my case, but repro's on build agents as well)
Worked before? If so, with which NuGet version: Unknown
Output of the diff:
diff --git a/packages.lock.json b/packages.lock.json
index 1d02123..d72a20f 100644
--- a/packages.lock.json
+++ b/packages.lock.json
@@ -9,7 +9,6 @@
"contentHash": "7D2TMufjGiowmt0E941kVoTIS+GTNzaPopuzM1/1LSaJAdJdBrVP0SkZW7AgDd0a2U1DjsIeaKG1wxGVBNLDMw==" }
},
- ".NETCoreApp,Version=v3.1/win7-x86": {},
".NETFramework,Version=v4.6.2": {
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
@@ -25,7 +24,6 @@
"resolved": "1.0.0",
"contentHash": "ONGjkFWduK13lfxUtlEl4+nYwrqDe5NF5f8qRtp5fqWiWYlqft/Ko9ht3e6Secg9y3I1yL8Xnfag/JGOOn0yoQ==" }
- },
- ".NETFramework,Version=v4.6.2/win7-x86": {}
+ }
}
}
\ No newline at end of file
Hi! Is there any chance of this getting prioritized? Just trying to plan.
is this ever going to happen?
I've given up.
I can reproduce this issue on .NET Core Console App that multi-targets net472 and a .NET core tfm. I cannot reproduce this issue on a .NET Core Class Library project with multiple target frameworks.
@nkolev92 helped me to find that .NET SDK sets runtime identifier to win7-86 here. It looks like following comment in the .targets file confirms this behavior.
When building a .NETFramework exe on Windows and not given a RID, we'll pick either win7-x64 or win7-x86

Transferring to dotnet/SDK team for feedback.
This issue is plaguing us also.
Most helpful comment
Hi! Is there any chance of this getting prioritized? Just trying to plan.