Here is how to waste a day - if you enjoy that sort of thing?
You can create your view directly in Visual Studio, then create a docType and assign that view as the template - but it does not work!
Code that works in other pages in the site, now doesn't work, but with very odd errors, eg
properties that clearly exist gives error of Umbraco.Web.Dynamics.DynamicXML does not contain property XXXX or something very similar, the errors were not of the type you may expect for loops etc. . . (this is from memory so may not be 100% accurate). Literally nothing worked as it should.
After many frustrating hours trying to put this right - gave up! Created a docType with matching template, put the original code I thought would work in it, and yes, first time it worked.
There are a couple of issues surrounding this error in bugs and You Track, but it is possible that many of us have suffered from this. However this is the first time I can pin-point that doing things in this order was the cause of the problem.
To re-iterate, create inside Umbraco first, it is the "safe" route.
Beware - Visual Studio Views v6
Hi
Here is how to waste a day - if you enjoy that sort of thing?
You can create your view directly in Visual Studio, then create a docType and assign that view as the template - but it does not work!
Code that works in other pages in the site, now doesn't work, but with very odd errors, eg
properties that clearly exist gives error of Umbraco.Web.Dynamics.DynamicXML does not contain property XXXX or something very similar, the errors were not of the type you may expect for loops etc. . . (this is from memory so may not be 100% accurate). Literally nothing worked as it should.
After many frustrating hours trying to put this right - gave up! Created a docType with matching template, put the original code I thought would work in it, and yes, first time it worked.
There are a couple of issues surrounding this error in bugs and You Track, but it is possible that many of us have suffered from this. However this is the first time I can pin-point that doing things in this order was the cause of the problem.
To re-iterate, create inside Umbraco first, it is the "safe" route.
Hope it helps
G
Umbraco templates/views are also stored in the database so always create them in the settings section. See this issue: http://issues.umbraco.org/issue/U4-59 - http://issues.umbraco.org/issue/U4-684
Jeroen
is working on a reply...