Reloading DLL without restarting

Options
jz87
edited January 2011 in DotNet
Is there a way to reload my server DLL without restarting Photon Server everytime? It really slows down my development cycle. Also I was wondering what the debugging options are? What process would I need to attach to to debug my server code?

Comments

  • Boris
    Options
    there is. check the photon-configuration.pdf bottom of page 2.

    example:
    			<Application
    				Name="Lite"
    				BaseDirectory="Lite\Lite"
    				Assembly="Lite"
    				Type="Lite.LiteApplication"
    				ForceAutoRestart="true"
    				RestartDelayMillis="5000"
    				WatchFiles="dll;config"
    				ExcludeFiles="log4net.config">
    			</Application>
    
    -->
    Forces a restart 5 seconds after detecting a change of any dll or config file is.
    Changes of the log4net.config file can be ignored when configuring log4net with XmlConfigurator.ConfigureAndWatch as this will apply new settings while the server is running.
  • jz87
    Options
    This doesn't seem to be working. When I attach to process the DLL is being loaded from the Cache directory instead of the bin directory that my build is targeted to. I still can't figure out how to get the server to reload the DLL when I rebuild without restarting the server.
  • Tobias
    Options
    The cache is used to let you overwrite the dll files. Otherwise, they would be locked.
    The restart of the application itself can't be avoided but the dll you replace is loaded and put into a new cache, where it's executed.

    Please try to verify this by changing some initialisation debug log.