You can setup a duplicate IIS container on a different ip address / hostname. Make your modification to the new version and then swap the ip's over. It gets rid of the compile time of the application restart. However, if you rely on in-proc session it'll all go wrong for any current users anyway.
Safest option is to allow it to restart and just pick a good time to do it. You can also set compilation batch = false. This can also speed up the compile time in critical systems.