Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I know it may not be the best practice, however we'd like to use the /app_code/ directory to create our extension classes. The umbracoAppTree requires a reference to an assembly.
Is there a way to use this? I've tried setting the treeHandlerAssembly to '__code' as well as the namespace of our extension classes to no avail. Of course, if I take that code and compile it into an assembly and drop it into the /bin/ folder it works just fine.
The reason that I'd like to do this is because we have a team working on a network share with our development environment. Sometimes we all need to modify a particular class and its a pain transferring the source to each developer each time they need it. Subversion would be an option, but before we explore that I'd like to know if:
A. Can the above be done using the /app_code/ folder?
B. How are other development teams handleing this.
Thanks in advance to anyone.
No, because the way the app trees are loaded it takes the assembly name and appends the type name to it, so if you had MyProject.MyNamespace.MyTree as the tree class in the assembly MyProject you need to set the class to MyNamespace.MyTree in the database table.
Because App_Code does a compile on application start up you wont know what the name of the assembly is since I"m pretty sure it's uniquely named when it compiles.
That said I know it is possibly to manipulate the collection of known trees at runtime so you could in create an Umbraco action handler class (inheriting ApplicationBase) which then dynamically injects your tree into the in-memory tree collection.If you want to do that I think you're going to be on your own, I know it's possible but it's not exactly supported :P
you can dynamically register trees without writing to the database. See this post:
HOWEVER, be aware that if you do this there's no way for an end user to un-register your tree unless they remove your code/DLL
Thank you both! From @Shannon's blog, it looks as if I can do what I need to do, but I think I'll stick to the tried and true manner for usability. @slace, thanks again for your quick response. It looks as if we'll need to get serious about programming and impliment subversion for our extensions.
Err yeah, I wouldn't go coding directly in the Umbraco back end with no version control :P
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted