Source code generation error: could not find template SD_VsNetAdapterTemplate

Posts   
 
    
acl
User
Posts: 91
Joined: 28-Mar-2012
# Posted on: 30-Aug-2016 17:20:28   

Hi all,

after upgrading to LLBLGen 5.0.5, we get the following error when generating source code:

Task: SD.Tasks.Adapter.VsNetDbGenericProjectFileCreator Could not find template 'SD_VsNetAdapterTemplate'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)

Task: SD.Tasks.Adapter.VsNetDbSpecificProjectFileCreator Could not find template 'SD_VsNetDBSpecificAdapterTemplate'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)

We don't get any compilation errors afterwards, so I just ignore them, but I'd still like to know what's going on.

For information: the code generation settings are: - Target Framework: LLBLGen Pro Runtime Framework - Output Type: Source-code (e.g. entity classes) - Target langauage: VB.NET - Target Platform: .NET 4.0 - Template Group: Adapter - Selected preset: SD.Presets.Adapter.General

Thanks!

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 31-Aug-2016 01:13:17   

Can't reproduce it with the same settings.

Task: SD.Tasks.Adapter.VsNetDbGenericProjectFileCreator Cleaned up project file. Project file '...Northwind.vbproj' has been altered succesfully.

Task: SD.Tasks.Adapter.VsNetDbSpecificProjectFileCreator Cleaned up project file. Project file '...NorthwindDBSpecific.vbproj' has been altered succesfully.

Are you using a custom preset / template bindings?

acl
User
Posts: 91
Joined: 28-Mar-2012
# Posted on: 01-Sep-2016 11:26:09   

We're not knowingly using custom template bindings.

Here is what the TemplateBindings of our LLBLGen project file look like:

        <TemplateBindings>
          <Binding Name="SD.TemplateBindings.SharedTemplates.NET4x" />
          <Binding Name="SD.TemplateBindings.SqlServerSpecific" />
          <Binding Name="SD.TemplateBindings.SharedTemplates" />
          <Binding Name="SD.TemplateBindings.General" />
        </TemplateBindings>

Following your reply we did find a solution: - Open "Generate Code" function - Click on "Edit Selected Task Specifics" (there's only one task in our case) - Open the target platform dropdown, and select ".NET 4.0" again! - Click Ok and compile

After this, the bindings look as follows, and the error went away:

        <TemplateBindings>
          <Binding Name="SD.TemplateBindings.SharedTemplates.NET40" />
          <Binding Name="SD.TemplateBindings.SharedTemplates.Deprecated" />
          <Binding Name="SD.TemplateBindings.SqlServerSpecific" />
          <Binding Name="SD.TemplateBindings.SharedTemplates" />
          <Binding Name="SD.TemplateBindings.General" />
        </TemplateBindings>

Maybe this is of help to someone with the same problem.

Let us know if there is something wrong with this.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 01-Sep-2016 12:08:08   

acl wrote:

We're not knowingly using custom template bindings.

Here is what the TemplateBindings of our LLBLGen project file look like:

        <TemplateBindings>
          <Binding Name="SD.TemplateBindings.SharedTemplates.NET4x" />
          <Binding Name="SD.TemplateBindings.SqlServerSpecific" />
          <Binding Name="SD.TemplateBindings.SharedTemplates" />
          <Binding Name="SD.TemplateBindings.General" />
        </TemplateBindings>

Following your reply we did find a solution: - Open "Generate Code" function - Click on "Edit Selected Task Specifics" (there's only one task in our case) - Open the target platform dropdown, and select ".NET 4.0" again! - Click Ok and compile

After this, the bindings look as follows, and the error went away:

        <TemplateBindings>
          <Binding Name="SD.TemplateBindings.SharedTemplates.NET40" />
          <Binding Name="SD.TemplateBindings.SharedTemplates.Deprecated" />
          <Binding Name="SD.TemplateBindings.SqlServerSpecific" />
          <Binding Name="SD.TemplateBindings.SharedTemplates" />
          <Binding Name="SD.TemplateBindings.General" />
        </TemplateBindings>

Maybe this is of help to someone with the same problem.

Let us know if there is something wrong with this.

This is the culprit: <Binding Name="SD.TemplateBindings.SharedTemplates.NET4x" /> The file 'SD.TemplateBindings.SharedTemplates.NET4x' doesn't exist, it's called 'SD.TemplateBindings.SharedTemplates.NET40'

But I'm unsure where that comes from, as it's also named <Binding Name="SD.TemplateBindings.SharedTemplates.NET40" /> in 4.2.

Anyway, because the templatebindings file wasn't found, the templates bound in that file aren't used, hence the error. this should have been visible in the application output page docked at the bottom of the designer as well though, but it's often overlooked.

Frans Bouma | Lead developer LLBLGen Pro
acl
User
Posts: 91
Joined: 28-Mar-2012
# Posted on: 01-Sep-2016 12:51:24   

Ok, thanks for the info. We have been using LLBLGen since the 2.0 days, so this might simply be a leftover in our project files. (We skipped 4.2, we went from 4.0 to 5.0.)

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 01-Sep-2016 16:06:33   

acl wrote:

Ok, thanks for the info. We have been using LLBLGen since the 2.0 days, so this might be simply be a leftover in our project files. (We skipped 4.2, we went from 4.0 to 5.0.)

Hmm... still, it's odd. Keep us posted if you run into one of these things again, so we can research it, as these things shouldn't happen! Glad it's cleared up though simple_smile

Frans Bouma | Lead developer LLBLGen Pro
acl
User
Posts: 91
Joined: 28-Mar-2012
# Posted on: 01-Sep-2016 16:27:41   

Will do, thanks! simple_smile