I am facing a assembly-not-found build problem on Win10 x64, using msbuild command line utility v14, targeting x86:
msbuild dummy.csproj /t:Rebuild /p:Configuration=Release;AppxBundle=Always;Platform=x86
The strange thing, is that, it seems to fail only on Win10 x64, not also on Win10 x86. I do not exclude although configuration differences.
And the error is:
Extracting .ResW files from assembly "C:\Users\abart.nuget\packages\Microsoft.CSharp\4.0.0\lib\netcore50\Microsoft.CSharp.dll" into "obj\x86\Release\".
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(1047,5): error MSB3816: Loading assembly "C:\Users\abart.nuget\packages\Microsoft.NETCore.Portable.Compatibility\1.0.0\runtimes\aot\lib\netcore50\mscorlib.dll" failed. System.IO.FileNotFoundException: Could not load file or assembly 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. [dummy.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(1047,5): error MSB3816: File name: 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' [dummy.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(1047,5): error MSB3816: at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) [dummy.csproj] ....
The mscorlib.dll file does exist.
Any ideas why is this happening?