Could not load file or assembly 'Devart.Data.PostgreSql.Entity, Version=7.4.422.6...
Posted: Fri 05 Jun 2015 09:57
Hello,
I downloaded and installed dotConnect for Postgres trial in order to test Code First functionnality.
I created a simple app following the article:
http://blog.devart.com/entity-framework ... force.html
My program dos not work:
System.IO.FileLoadException: Could not load file or assembly 'Devart.Data.PostgreSql.Entity, Version=7.4.422.6, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of the dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Did I forget semething ?
Here is my app.config file:
[/size]
The program:
[/size]
In the ConsoleApplicatin.csproj, the dependencies are:
I removed Devart.Data.PostgreSql.Entity from the Global Assembly Cache because it was EF5's version that was referenced.
But I still have the problem.
I downloaded and installed dotConnect for Postgres trial in order to test Code First functionnality.
I created a simple app following the article:
http://blog.devart.com/entity-framework ... force.html
My program dos not work:
System.IO.FileLoadException: Could not load file or assembly 'Devart.Data.PostgreSql.Entity, Version=7.4.422.6, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of the dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Did I forget semething ?
Here is my app.config file:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission="false" />
</configSections>
<connectionStrings>
<add name="PostgresQL" connectionString="server=srvubuntu01;user id=postgres;password=postgres;database=MeteodynPSQL.MeteodynContext" providerName="PSQLprovider" />
</connectionStrings>
<entityFramework>
<providers>
<provider invariantName="PSQLprovider"
type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity, Version=7.4.422.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</providers>
</entityFramework>
</configuration>
The program:
Code: Select all
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Devart.Data.PostgreSql.Entity;
using System.Data.Entity;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
var context = new DbContext("PostgresQL");
}
}
}
In the ConsoleApplicatin.csproj, the dependencies are:
Code: Select all
[size=85] <ItemGroup>
<Reference Include="Devart.Data.PostgreSql.Entity, Version=7.3.422.6, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Devart\dotConnect\PostgreSQL\Entity\EF6\Devart.Data.PostgreSql.Entity.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>[/size]
But I still have the problem.