In my Umbraco 6 project I have some UserControl macros. Changes in the code behind of these user controls don't take effect until I recompile the project. It's not so bad at the moment as the project is still small but over time I don't want to have to wait minutes at a time to see the changes take effect.
Is it possible in Umbraco to set the project up in a way that the user controls can just be compiled at run time like a regular .net website?
You have probably set up your project as web application which is more efficient in terms of performance.In this case you need to compile the project as soon as you change anything in c# or code behind.
Alternatively you could convert your project to website (I wont not recommend it) then you don't need to compile yourself. the code will be compiled the first time it's called.
Thanks for the information - I'll read more into it.
It would be great if during development the site could act as a website - so that changes could be seen instantly - but then for production it's converted to a web application?
I guess in smaller projects a website make more sense as you can instantly see changes as the website is built quickly as you refresh the page. However, for larger projects it possibly doesn't matter:
a. Make change to code, wait for build, refresh page
b. Make change to code, refresh page, wait for build
It's the same thing really except you're either watching a build complete in Visual Studio or a spinner in your browser!
UserControl Macros without compile
In my Umbraco 6 project I have some UserControl macros. Changes in the code behind of these user controls don't take effect until I recompile the project. It's not so bad at the moment as the project is still small but over time I don't want to have to wait minutes at a time to see the changes take effect.
Is it possible in Umbraco to set the project up in a way that the user controls can just be compiled at run time like a regular .net website?
Many thanks,
Ian.
Hi Ian,
You have probably set up your project as web application which is more efficient in terms of performance.In this case you need to compile the project as soon as you change anything in c# or code behind.
Alternatively you could convert your project to website (I wont not recommend it) then you don't need to compile yourself. the code will be compiled the first time it's called.
you could find more information about it here
Cheers
Ali
Thanks for the information - I'll read more into it.
It would be great if during development the site could act as a website - so that changes could be seen instantly - but then for production it's converted to a web application?
you can buy dotnet demon which compiles the project as you write/save so you dont need to compile it.
Thanks for the link.
I guess in smaller projects a website make more sense as you can instantly see changes as the website is built quickly as you refresh the page. However, for larger projects it possibly doesn't matter:
a. Make change to code, wait for build, refresh page
b. Make change to code, refresh page, wait for build
It's the same thing really except you're either watching a build complete in Visual Studio or a spinner in your browser!
is working on a reply...