Problems with OrmLite.Poco T4 templates after upgraded VS project

Hi,

we have updated our VS project files to latest version (2017) and after that my T4 templates are not updated.
I get an error

Any idea to solve it? Have tried to exclude and include files in project (read a suggestion about this in a forum, didnt help)

Error Running transformation: System.Runtime.Serialization.SerializationException: Type ‘Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProject’ in Assembly ‘Microsoft.VisualStudio.ProjectSystem.VS.Implementation, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ is not marked as serializable.

Server stack trace:
at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)
at System.Runtime.Serialization.FormatterServices.<>c__DisplayClass9_0.b__0(MemberHolder _)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeMessageParts(ArrayList argsToSerialize)
at System.Runtime.Remoting.Messaging.SmuggledMethodReturnMessage…ctor(IMethodReturnMessage mrm)
at System.Runtime.Remoting.Messaging.SmuggledMethodReturnMessage.SmuggleIfPossible(IMessage msg)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(Object[] args)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at EnvDTE._DTE.get_ActiveSolutionProjects()
at Microsoft.VisualStudio.TextTemplating5AA1CC4F8AD1F35B390223FED86AFC7D2EFCFF7D6EA43EE5DBFA3DFA1D067F5D59375D00B3FBF85FEB4F452FD7D0C22E6C04E3A0121837EA03BE630DB2A2DD2F.GeneratedTextTransformation.GetCurrentProject()
at Microsoft.VisualStudio.TextTemplating5AA1CC4F8AD1F35B390223FED86AFC7D2EFCFF7D6EA43EE5DBFA3DFA1D067F5D59375D00B3FBF85FEB4F452FD7D0C22E6C04E3A0121837EA03BE630DB2A2DD2F.GeneratedTextTransformation.GetConnectionString(String& connectionStringName, String& providerName)
at Microsoft.VisualStudio.TextTemplating5AA1CC4F8AD1F35B390223FED86AFC7D2EFCFF7D6EA43EE5DBFA3DFA1D067F5D59375D00B3FBF85FEB4F452FD7D0C22E6C04E3A0121837EA03BE630DB2A2DD2F.GeneratedTextTransformation.InitConnectionString()
at Microsoft.VisualStudio.TextTemplating5AA1CC4F8AD1F35B390223FED86AFC7D2EFCFF7D6EA43EE5DBFA3DFA1D067F5D59375D00B3FBF85FEB4F452FD7D0C22E6C04E3A0121837EA03BE630DB2A2DD2F.GeneratedTextTransformation.LoadTables(Boolean makeSingular)
at Microsoft.VisualStudio.TextTemplating5AA1CC4F8AD1F35B390223FED86AFC7D2EFCFF7D6EA43EE5DBFA3DFA1D067F5D59375D00B3FBF85FEB4F452FD7D0C22E6C04E3A0121837EA03BE630DB2A2DD2F.GeneratedTextTransformation.TransformText() BokaMera.API.ServiceModel

No idea. OrmLite is a code-first ORM, the T4 templates are only there to help bootstrap the models from an existing database and should only be run once when creating the data models from a DB, after they’re run the first time you should be taking over maintenance of the tables.

Can we have a link to those T4 Template please ?

The T4 Templates are included in the NuGet package, the sources like everything else is available on GitHub: