I'm trying to set up a T4 file that should create a new DBContext object. The configuration is loaded from a .config File.
I'm using a DevartProvider instead of the default SqlServerProvider, which is normally referenced with CopyLocal set to True within a project.
Within the T4 template file im using
<#@ assembly name="$(SolutionDir)\SomePath\Devart.Data.PostgreSql.Entity.dll" #>
but when creating the DBContext I get an Exception because the dll is not found:
Additional information: The Entity Framework provider type 'Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity' registered in the application config file for the ADO.NET provider with invariant name 'Devart.Data.PostgreSql' could not be loaded Make sure that the assembly-qualified name is used and that the assembly is available to the running application.
I could copy the DLL to the IDE folder where the T4 gets executed (C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE), but since this setup should run on multiple machines this workaround would be unacceptable.
How can I make this assembly available during T4 execution?