BLToolkit + T4 generation + PostgreSQL database, possible? -


want generate data layer using bltoolkit, t4 templates , postgresql. receive exception running t4 template, based on 1 suggested documentation:

error 5 running transformation: system.argumentnullexception: value cannot null.  parameter name: type, @ system.activator.createinstance(type type, boolean nonpublic) (...) 

working in vsnet08, libraries referenced, connecting mssql works ok, , @ first, seems correct, leave something...

this .tt template:

<#@ template language="c#v3.5" hostspecific="true" #>  <#@ output extension=".generated.cs"   #>  <#@ include file="bltoolkit.ttinclude" #>  <#@ include file="postgresql.ttinclude"    #>  <#@ include file="pluralsingular.ttinclude" #>  <#    connectionstring = "<connection string postgresql database";    dataproviderassembly = @"..\references\npgsql.dll";    generatemodel();  #> 

most t4 can't find npgsql.dll. when t4 running, current directory not project location. should try full path.

another problem depended assemblies. add following template:

system.reflection.assembly.loadfile(@"...postgresqllocation...\mono.security.dll"); 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -