Bug 56344 - msbuild fail to restore EntityFramework 6.1.3
Summary: msbuild fail to restore EntityFramework 6.1.3
Status: RESOLVED FIXED
Alias: None
Product: Tools
Classification: Mono
Component: msbuild ()
Version: 5.0 (2017-02)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Ankit Jain
URL:
Depends on:
Blocks:
 
Reported: 2017-05-13 11:31 UTC by Lorenzo Delana
Modified: 2017-10-24 20:30 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Lorenzo Delana 2017-05-13 11:31:19 UTC
REPRO
-----
$ git clone https://github.com/devel0/SearchAThing.Core.git
$ cd SearchAThing.Core
$ git checkout 605d472afd5d2dd30a72ac1da1a894dd0fa999d3
$ msbuild /t:restore,rebuild

RESULTS
-------
/usr/lib/mono/xbuild/Microsoft/NuGet/Microsoft.NuGet.targets(178,5): error : The package EntityFramework with version 6.1.3 could not be found in /root/.nuget/packages/. Run a NuGet package restore to download the package. [/nas/share/opensource/SearchAThing.Core/src/SearchAThing.Core.csproj]

RELEVANTS
---------
$ ls -la /root/.nuget/packages/entityframework/
total 28
drwxr-xr-x   3 root root  4096 May 13 13:17 .
drwxr-xr-x 232 root root 20480 May 13 13:17 ..
drwxr-xr-x   5 root root  4096 May 13 13:17 6.1.3

CONSIDERATIONS
--------------
may a problem related to name casing
Comment 1 Lorenzo Delana 2017-05-13 15:19:13 UTC
PLATFORM
--------
$ mono --version
Mono JIT compiler version 5.3.0 (Nightly 5.3.0.262/137e1e7 Tue May  2 14:47:25 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen (concurrent by default)

$ msbuild /version
Microsoft (R) Build Engine version 15.2.0.0 ( Thu May 11 17:28:41 UTC 2017)
Copyright (C) Microsoft Corporation. All rights reserved.

15.2.0.0
Comment 2 Ankit Jain 2017-05-14 22:49:45 UTC
How did you install msbuild?
Comment 3 Lorenzo Delana 2017-05-14 23:10:25 UTC
through apt-get install mono-complete

I tried through docker with either latest stable

$ apt-cache policy mono-complete
mono-complete:
  Installed: 5.0.0.100-0xamarin4+debian7b1
  Candidate: 5.0.0.100-0xamarin4+debian7b1
  Version table:
 *** 5.0.0.100-0xamarin4+debian7b1 500
        500 http://download.mono-project.com/repo/debian wheezy/main amd64 Packages
        100 /var/lib/dpkg/status
     4.2.1.102+dfsg2-7ubuntu4 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

and latest nightly getting the same behavior

$ apt-cache policy mono-complete
mono-complete:
  Installed: 5.3.0.262-0nightly3
  Candidate: 5.3.0.262-0nightly3
  Version table:
 *** 5.3.0.262-0nightly3 500
        500 http://download.mono-project.com/repo/debian nightly/main amd64 Packages
        100 /var/lib/dpkg/status
     5.0.0.100-0xamarin4+debian7b1 500
        500 http://download.mono-project.com/repo/debian wheezy/main amd64 Packages
     4.2.1.102+dfsg2-7ubuntu4 500
        500 http://it.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
Comment 4 Marek Safar 2017-09-04 22:25:08 UTC
Resetting status
Comment 5 Ankit Jain 2017-10-24 14:37:14 UTC
Could you try with the latest stable? This was likely fixed by https://github.com/NuGet/NuGet.BuildTasks/commit/112685a925e5c0d26fcf9c9006341d4fa4f66515 .
Comment 6 Lorenzo Delana 2017-10-24 20:30:54 UTC
it worked successfully with a docker ubuntu:16.04 with latest mono-devel package installation ( http://www.mono-project.com/download/ )

Thanks you

root@4dc83846d710:/usr/src# cd SearchAThing.Core
root@4dc83846d710:/usr/src/SearchAThing.Core# git checkout 605d472afd5d2dd30a72ac1da1a894dd0fa999d3
Note: checking out '605d472afd5d2dd30a72ac1da1a894dd0fa999d3'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 605d472... update package ref newtonsoft, npgsql
root@4dc83846d710:/usr/src/SearchAThing.Core# msbuild /t:restore,rebuild
Microsoft (R) Build Engine version 15.4.0.0 ( Thu Oct 12 17:13:10 UTC 2017) for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 10/24/2017 20:21:20.
Project "/usr/src/SearchAThing.Core/SearchAThing.Core.sln" on node 1 (restore;rebuild target(s)).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|Any CPU".
Restore:
  Restoring packages for /usr/src/SearchAThing.Core/src/SearchAThing.Core.csproj...
    GET https://api.nuget.org/v3-flatcontainer/entityframework/index.json
    GET https://api.nuget.org/v3-flatcontainer/npgsql/index.json
    GET https://api.nuget.org/v3-flatcontainer/mongodb.bson/index.json
    GET https://api.nuget.org/v3-flatcontainer/newtonsoft.json/index.json
    GET https://api.nuget.org/v3-flatcontainer/system.valuetuple/index.json
    OK https://api.nuget.org/v3-flatcontainer/npgsql/index.json 481ms
    GET https://api.nuget.org/v3-flatcontainer/npgsql/3.2.2/npgsql.3.2.2.nupkg
    OK https://api.nuget.org/v3-flatcontainer/entityframework/index.json 955ms
    GET https://api.nuget.org/v3-flatcontainer/entityframework/6.1.3/entityframework.6.1.3.nupkg
    OK https://api.nuget.org/v3-flatcontainer/mongodb.bson/index.json 1460ms
    GET https://api.nuget.org/v3-flatcontainer/mongodb.bson/2.4.3/mongodb.bson.2.4.3.nupkg
    OK https://api.nuget.org/v3-flatcontainer/newtonsoft.json/index.json 1929ms
    GET https://api.nuget.org/v3-flatcontainer/newtonsoft.json/10.0.2/newtonsoft.json.10.0.2.nupkg
    OK https://api.nuget.org/v3-flatcontainer/system.valuetuple/index.json 2393ms
    GET https://api.nuget.org/v3-flatcontainer/system.valuetuple/4.3.0/system.valuetuple.4.3.0.nupkg
    OK https://api.nuget.org/v3-flatcontainer/npgsql/3.2.2/npgsql.3.2.2.nupkg 2348ms
    OK https://api.nuget.org/v3-flatcontainer/entityframework/6.1.3/entityframework.6.1.3.nupkg 3735ms
    GET https://api.nuget.org/v3-flatcontainer/system.threading.tasks.extensions/index.json
    OK https://api.nuget.org/v3-flatcontainer/mongodb.bson/2.4.3/mongodb.bson.2.4.3.nupkg 6212ms
    OK https://api.nuget.org/v3-flatcontainer/newtonsoft.json/10.0.2/newtonsoft.json.10.0.2.nupkg 6505ms
    OK https://api.nuget.org/v3-flatcontainer/system.valuetuple/4.3.0/system.valuetuple.4.3.0.nupkg 7359ms
    OK https://api.nuget.org/v3-flatcontainer/system.threading.tasks.extensions/index.json 5413ms
    GET https://api.nuget.org/v3-flatcontainer/system.threading.tasks.extensions/4.3.0/system.threading.tasks.extensions.4.3.0.nupkg
    OK https://api.nuget.org/v3-flatcontainer/system.threading.tasks.extensions/4.3.0/system.threading.tasks.extensions.4.3.0.nupkg 9ms
  Installing System.Threading.Tasks.Extensions 4.3.0.
  Installing Npgsql 3.2.2.
  Installing System.ValueTuple 4.3.0.
  Installing Newtonsoft.Json 10.0.2.
  Installing MongoDB.Bson 2.4.3.
  Installing EntityFramework 6.1.3.
  Committing restore...
  Generating MSBuild file /usr/src/SearchAThing.Core/src/obj/SearchAThing.Core.csproj.nuget.g.props.
  Generating MSBuild file /usr/src/SearchAThing.Core/src/obj/SearchAThing.Core.csproj.nuget.g.targets.
  Writing lock file to disk. Path: /usr/src/SearchAThing.Core/src/obj/project.assets.json
  Restore completed in 15.58 sec for /usr/src/SearchAThing.Core/src/SearchAThing.Core.csproj.
  
  NuGet Config files used:
      /root/.config/NuGet/NuGet.Config
  
  Feeds used:
      https://api.nuget.org/v3/index.json
  
  Installed:
      6 package(s) to /usr/src/SearchAThing.Core/src/SearchAThing.Core.csproj
Project "/usr/src/SearchAThing.Core/SearchAThing.Core.sln" (1) is building "/usr/src/SearchAThing.Core/src/SearchAThing.Core.csproj" (2:9) on node 1 (Rebuild target(s)).
CoreClean:
  Creating directory "obj/Debug/".
PrepareForBuild:
  Creating directory "bin/Debug/".
CoreCompile:
  /usr/lib/mono/4.5/csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:/root/.nuget/packages/entityframework/6.1.3/lib/net45/EntityFramework.dll /reference:/root/.nuget/packages/entityframework/6.1.3/lib/net45/EntityFramework.SqlServer.dll /reference:/usr/lib/mono/4.6-api/Microsoft.CSharp.dll /reference:/root/.nuget/packages/mongodb.bson/2.4.3/lib/net45/MongoDB.Bson.dll /reference:/usr/lib/mono/4.6-api/mscorlib.dll /reference:/root/.nuget/packages/newtonsoft.json/10.0.2/lib/net45/Newtonsoft.Json.dll /reference:/root/.nuget/packages/npgsql/3.2.2/lib/net451/Npgsql.dll /reference:/usr/lib/mono/4.6-api/System.ComponentModel.DataAnnotations.dll /reference:/usr/lib/mono/4.6-api/System.Core.dll /reference:/usr/lib/mono/4.6-api/System.Data.DataSetExtensions.dll /reference:/usr/lib/mono/4.6-api/System.Data.dll /reference:/usr/lib/mono/4.6-api/System.dll /reference:/usr/lib/mono/4.6-api/System.Net.Http.dll /reference:/usr/lib/mono/4.6-api/System.Runtime.Serialization.dll /reference:/root/.nuget/packages/system.threading.tasks.extensions/4.3.0/lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.dll /reference:/root/.nuget/packages/system.valuetuple/4.3.0/lib/netstandard1.0/System.ValueTuple.dll /reference:/usr/lib/mono/4.6-api/System.Xml.dll /reference:/usr/lib/mono/4.6-api/System.Xml.Linq.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Collections.Concurrent.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Collections.dll /reference:/usr/lib/mono/4.6-api/Facades/System.ComponentModel.Annotations.dll /reference:/usr/lib/mono/4.6-api/Facades/System.ComponentModel.dll /reference:/usr/lib/mono/4.6-api/Facades/System.ComponentModel.EventBasedAsync.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Diagnostics.Contracts.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Diagnostics.Debug.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Diagnostics.Tools.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Diagnostics.Tracing.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Dynamic.Runtime.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Globalization.dll /reference:/usr/lib/mono/4.6-api/Facades/System.IO.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Linq.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Linq.Expressions.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Linq.Parallel.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Linq.Queryable.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Net.NetworkInformation.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Net.Primitives.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Net.Requests.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Net.WebHeaderCollection.dll /reference:/usr/lib/mono/4.6-api/Facades/System.ObjectModel.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Reflection.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Reflection.Emit.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Reflection.Emit.ILGeneration.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Reflection.Emit.Lightweight.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Reflection.Extensions.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Reflection.Primitives.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Resources.ResourceManager.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Runtime.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Runtime.Extensions.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Runtime.Handles.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Runtime.InteropServices.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Runtime.InteropServices.WindowsRuntime.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Runtime.Numerics.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Runtime.Serialization.Json.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Runtime.Serialization.Primitives.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Runtime.Serialization.Xml.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Security.Principal.dll /reference:/usr/lib/mono/4.6-api/Facades/System.ServiceModel.Duplex.dll /reference:/usr/lib/mono/4.6-api/Facades/System.ServiceModel.Http.dll /reference:/usr/lib/mono/4.6-api/Facades/System.ServiceModel.NetTcp.dll /reference:/usr/lib/mono/4.6-api/Facades/System.ServiceModel.Primitives.dll /reference:/usr/lib/mono/4.6-api/Facades/System.ServiceModel.Security.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Text.Encoding.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Text.Encoding.Extensions.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Text.RegularExpressions.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Threading.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Threading.Tasks.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Threading.Tasks.Parallel.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Threading.Timer.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Xml.ReaderWriter.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Xml.XDocument.dll /reference:/usr/lib/mono/4.6-api/Facades/System.Xml.XmlSerializer.dll /debug+ /debug:portable /filealign:512 /optimize- /out:obj/Debug/SearchAThing.Core.dll /subsystemversion:6.00 /target:library /utf8output CircularEnumerator.cs CircularList.cs Collections.cs EventOperation.cs Exception.cs IEventOperation.cs Fluent.cs LinqExpr.cs Progress.cs Markdown.cs ObjectDiff.cs Dynamic.cs JsonHelper.cs Assembly.cs Postgresql.cs ObjectHelpers.cs Number.cs IScopedChild.cs ScopedChildren.cs Path.cs ProcessTask.cs Properties/AssemblyInfo.cs Serializer.cs Stream.cs DateTime.cs StringID.cs String.cs "/tmp/.NETFramework,Version=v4.6.AssemblyAttributes.cs"
_CopyFilesMarkedCopyLocal:
  Copying file from "/root/.nuget/packages/entityframework/6.1.3/lib/net45/EntityFramework.SqlServer.dll" to "bin/Debug/EntityFramework.SqlServer.dll".
  Copying file from "/root/.nuget/packages/entityframework/6.1.3/lib/net45/EntityFramework.dll" to "bin/Debug/EntityFramework.dll".
  Copying file from "/root/.nuget/packages/mongodb.bson/2.4.3/lib/net45/MongoDB.Bson.dll" to "bin/Debug/MongoDB.Bson.dll".
  Copying file from "/root/.nuget/packages/newtonsoft.json/10.0.2/lib/net45/Newtonsoft.Json.dll" to "bin/Debug/Newtonsoft.Json.dll".
  Copying file from "/root/.nuget/packages/npgsql/3.2.2/lib/net451/Npgsql.dll" to "bin/Debug/Npgsql.dll".
  Copying file from "/root/.nuget/packages/system.threading.tasks.extensions/4.3.0/lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.dll" to "bin/Debug/System.Threading.Tasks.Extensions.dll".
  Copying file from "/root/.nuget/packages/system.valuetuple/4.3.0/lib/netstandard1.0/System.ValueTuple.dll" to "bin/Debug/System.ValueTuple.dll".
  Creating "/usr/src/SearchAThing.Core/src/obj/Debug/SearchAThing.Core.csproj.CopyComplete" because "AlwaysCreate" was specified.
_CopyAppConfigFile:
  Copying file from "App.config" to "bin/Debug/SearchAThing.Core.dll.config".
CopyFilesToOutputDirectory:
  Copying file from "obj/Debug/SearchAThing.Core.dll" to "bin/Debug/SearchAThing.Core.dll".
  SearchAThing.Core -> /usr/src/SearchAThing.Core/src/bin/Debug/SearchAThing.Core.dll
  Copying file from "obj/Debug/SearchAThing.Core.pdb" to "bin/Debug/SearchAThing.Core.pdb".
Done Building Project "/usr/src/SearchAThing.Core/src/SearchAThing.Core.csproj" (Rebuild target(s)).
Done Building Project "/usr/src/SearchAThing.Core/SearchAThing.Core.sln" (restore;rebuild target(s)).

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:19.72