Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue Installing Entity Framework 7 RC1

I 'm trying to install EF7 rc1 to an existing project:

PM> Install-Package EntityFramework.MicrosoftSqlServer –Pre

but I get the following error:

Install failed. Rolling back...
Package 'Microsoft.Extensions.Logging 1.0.0-rc1-final' does not exist in project 'XYZ'

And at in the end of the trace I get this other message:

Install-Package : Failed to add reference to 'System.Collections.Concurrent'. Please make sure that it is in the Global Assembly Cache.

I googled and can see that Concurrent collection have been in dotnet for a while but I have not such assembly in my dev box.

Update:

After querying the gac with gacutil I realize that indeed the assembly is present:

The Global Assembly Cache contains the following assemblies:

System.Collections.Concurrent, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL

like image 491
E-Bat Avatar asked Nov 20 '15 15:11

E-Bat


2 Answers

As I had no System.Collections.Concurrent assembly in GAC, I installed System.Collections.Concurrent NuGet package:

Install-Package System.Collections.Concurrent

Then manually added reference to packages\System.Collections.Concurrent.4.0.10\lib\dotnet\System.Collections.Concurrent.dll (because net46 folder was empty).

After that, installation of EntityFramework.MicrosoftSqlServer finished with no errors.

like image 131
gius Avatar answered Oct 08 '22 10:10

gius


After getting this error, I was able to install EF7 RC1 to my project by removing references to my other projects, after that I was able to install EF7 RC1 succesfully to the project where I needed it, and then added references back, after which solution started to compile (and at least some basic EF functionality starts to work). Probably a glitch of nuget/dnu.

like image 39
avitenberg Avatar answered Oct 08 '22 10:10

avitenberg