Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ian Black 54 posts 230 karma points
    Nov 05, 2013 @ 12:50
    Ian Black
    0

    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.

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Nov 05, 2013 @ 12:56
    Ali Sheikh Taheri
    100

    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

  • Ian Black 54 posts 230 karma points
    Nov 05, 2013 @ 13:07
    Ian Black
    0

    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? 

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Nov 05, 2013 @ 13:36
    Ali Sheikh Taheri
    1

    you can buy dotnet demon which compiles the project as you write/save so you dont need to compile it.

  • Ian Black 54 posts 230 karma points
    Nov 07, 2013 @ 12:32
    Ian Black
    0

    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!

Please Sign in or register to post replies

Write your reply to:

Draft