Developer forum

Forum » CMS - Standard features » The same key was already used for another template

The same key was already used for another template

Jonas Krarup Dam
Reply

Hi,

I have a problem where, whenever I make a change to a template (even just adding a space or a newline), my frontend breaks with the message:

Exception in template (UserManagement/ViewProfile/xxxxx.cshtml): System.InvalidOperationException: The same key was already used for another template!

The exception goes away when I restart the application.

Has anyone seen this behaviour before? It makes frontend work really tedious...

 

/Jonas

 


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Hi Jonas,

Which version does the Dynamicweb.dll have?
I made a change related to template cache keys in 9.6.0 in order to fix that error.

/Morten

 
Jonas Krarup Dam
Reply

Hi Morten,

I've figured it out: It is an old version of DW, and I had managed to get a too-new version of RazorEngine.dll included in the project.

Going back to the right version fixed the problem.

 

/Jonas

 

You must be logged in to post in the forum