Pritish
Pritish

Reputation: 2224

System.IO.FileNotFoundException: Could not load assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Getting this Error In Xamarin Form Android Project I am refering Entity framework library int android project. Error as below

Severity Code Description Project File Line Suppression State Error Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Perhaps it doesn't exist in the Mono for Android profile? File name: 'EntityFramework.dll' at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection1 assemblies, AssemblyDefinition assembly, Boolean topLevel) at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection1 assemblies, AssemblyDefinition assembly, Boolean topLevel) at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel) at Xamarin.Android.Tasks.ResolveAssemblies.Execute(DirectoryAssemblyResolver resolver) RadLoc.Android C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets 1500

I am stuck here please help me out of this..

Upvotes: 1

Views: 1109

Answers (2)

Ryan Dooley
Ryan Dooley

Reputation: 254

For a windows application with this error:

If your copying the exe to a different folder from /bin/ You also need to include a copy of the application .config file along with the EntityFramework.xml and EntityFramework.SqlServer.xml files.

Upvotes: 1

Elvis Xia - MSFT
Elvis Xia - MSFT

Reputation: 10841

Just like @magicandre1981 said. Entity Framework doesn't fit in Xamarin.Android project. You need to use EntityFramework Core.

For a simple jump in and brief introduction, you can refer to Building Android Apps with Entity Framework.

Upvotes: 1

Related Questions