I'm trying hard to follow the "ApproveIt" tutorial.
After I make a significant change to the code, I delete the temporary ASP.NET files on my server and after recompilation, the location of the compiled code will change.
I've noticed that if I haven’t removed the entries for my package in the trees.config file, (they'll be put back as I've created a .cs file in app_code) my trees will not work in the backoffice because the trees.config file is still looking for the code in the previous location.
I've been using two folders in the App_Code folder - one for CS code and the other for VB code.
Recompiling a site can mean that assemblies have a new location in the Temporary ASP.NET Files folder (in my case prefixed by App_SubCode_CSCode for the CS code, followed by a random set of digits).
If you remove the entry in the trees.config file for any *TreeController.cs code you place in the App_Code folder, it gets recreated on recompilation. However, the location of the Assembly will change which could break your backoffice app, if you forget to remove the entry.
If you decide not to create a .dll in the bin folder, it looks you can reference the assembly as
trees.config confusion
I'm trying hard to follow the "ApproveIt" tutorial.
After I make a significant change to the code, I delete the temporary ASP.NET files on my server and after recompilation, the location of the compiled code will change.
I've noticed that if I haven’t removed the entries for my package in the trees.config file, (they'll be put back as I've created a .cs file in app_code) my trees will not work in the backoffice because the trees.config file is still looking for the code in the previous location.
Is that a fair assumption?
Yes, my assumption was correct.
I've been using two folders in the
App_Code
folder - one for CS code and the other for VB code.Recompiling a site can mean that assemblies have a new location in the
Temporary ASP.NET Files
folder (in my case prefixed byApp_SubCode_CSCode
for the CS code, followed by a random set of digits).If you remove the entry in the
trees.config
file for any*TreeController.cs
code you place in theApp_Code
folder, it gets recreated on recompilation. However, the location of the Assembly will change which could break your backoffice app, if you forget to remove the entry.If you decide not to create a .dll in the
bin
folder, it looks you can reference the assembly as...
type="MyNameSpace.MyTreeController, App_SubCode_CSCode"
,leaving out the random code, and your app should be available in the backoffice.
Probably not the best way to do things, but hey ho, I'm still learning.
Thanks, Muiris
is working on a reply...