News, examples, tips, ideas and plans.
Thoughts around ORM, .NET and SQL databases.

Wednesday, May 02, 2012

DataObjects.Net 4.5.1 RC2

DataObjects.Net 4.5.1 RC2 is available.

The following improvements are included:
  • Fixed missing associations under certain conditions (like in 4.4.3 RC2)
  • Fixed incorrect OnOwnerRemove=Clear for non-paired associations (like in 4.4.3 RC2)
  • NuGet package for Firebird provider is now available
  • NuGet package for PostgreSQL provider is now available with some work around.
  • Fixed LINQ translator regression in DateTime operations that occurred in 4.5.1 RC
  • More friendly names are displayed for NuGet packages (i.e. DataObjects.Net instead of Xtensive.Orm for main package)
Binaries and installer could be downloaded here. NuGet packages are available as well.

Workaround for PostgreSQL provider package

NuGet package for PostgreSQL is now available as well. However it does not work out of the box. DataObjects.Net is built against Npgsql 2.0.11.92, however only 2.0.11.0 is available at NuGet.

NuGet package manager is aware of such situations and tries to make a work around by adding binding redirection where required.

If you add  Xtensive.Orm.PostgreSql package to your project, you might see binding redirection is added to app.config/web.config (I've added line breaks to fit into blog width)

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity
      name="Npgsql"
      publicKeyToken="5d8b90d52f46fda7"
      culture="neutral" />
    <bindingRedirect
      oldVersion="0.0.0.0-2.0.11.0"
      newVersion="2.0.11.0" />
  </dependentAssembly>
</assemblyBinding>

This does not work unfortunately, because Xtensive.Orm.PostgreSql assembly depends on a version that is newer than available version. It seems that NuGet tools only consider the reverse scenario, where dependent assembly is built against older version.

To solve this issue, you'll need to change old version range to include newer versions as well:

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity
      name="Npgsql"
      publicKeyToken="5d8b90d52f46fda7"
      culture="neutral" />
    <bindingRedirect
      oldVersion="0.0.0.0-2.0.11.9999"
      newVersion="2.0.11.0" />
  </dependentAssembly>
</assemblyBinding>

Migration path

No special migration is required. This version is source and binary compatible with 4.5.0 and 4.5.1 RC.

No comments:

Post a Comment