Cached assemblies on photon

Djebedia
✭
Hi!
I'm using photon v4.0.28.2962 and have some problems with assemblies being cached.
I built a plugin that references to an assembly and everything's fine: plugin gets created and assembly gets loaded.
Then, I made some changes to that assembly and rebuilt the plugin. As the result the plugin gets created but new assembly is not get loaded. It seems like first of all Photon searches for an assembly in cache - is that right? What can I do to make Photon load the assembly from the local folder?
PS. Sorry for my English )
I'm using photon v4.0.28.2962 and have some problems with assemblies being cached.
I built a plugin that references to an assembly and everything's fine: plugin gets created and assembly gets loaded.
Then, I made some changes to that assembly and rebuilt the plugin. As the result the plugin gets created but new assembly is not get loaded. It seems like first of all Photon searches for an assembly in cache - is that right? What can I do to make Photon load the assembly from the local folder?
PS. Sorry for my English )
0
Comments
-
@chvetsov Ilya, thanks for reply
But I don't get it
Maybe I've explained it not well enough
I have two versions of plugin, one references to some dll v1.0.0.1 and the other - to dll v1.0.02. Those dlls are in plugin folders. But if I try to create the first plugin which references to dll v1.0.0.1 the newer version of dll is loaded instead. And that dll v1.0.0.2 is stored in Photon\deploy\LoadBalancing\GameServer\bin\Cache\Game\assembly\dl3\xxx\yyy folder
So I want to load older version of dll which lies in plugin folder - what should I do?
And what should I update in plugin.config?0 -
what is your plugins folder structure? how do you add new version?
best,
ilya0 -
Photon\deploy\Plugins\ConcreteGamePlugin - this is the main folder with plugins and each plugin is within its own folder in that main folder0
-
how do you configure your plugins?
best,
ilya0 -
I'm talking about plugin.config. what do you do ?
It should look like this:
you have next folders strucuture
Plugins/YouPluginName/Version/bin/ and here Plugin and helper assemblies
so, for first version you will have it:
Plugins/YouPluginName/1.0/bin/
in your plugin.config there is 'Version' field that should be set to 1.0
Once you have new version. Let's say '2.0', first what you do is copying of plugin to folder
Plugins/YouPluginName/2.0/bin/ and then you update 'Version' field in plugin.config.
In this case everything should be loaded correctly.
Ah there is one thing. You may break this algorithm if you are loading helper dll your self using Assembly.Load or Assembly.LoadFrom methods
best,
ilya0 -
Hm, I don't get it )
I don't have plugin.config file
But I found out something: it looks like first of all photon tries to load all necessary dlls from \Photon\deploy\LoadBalancing\GameServer\bin. In case those required dlls were found photon caches them at \Photon\deploy\LoadBalancing\GameServer\bin\Cache\Game\assembly\dl3. And in case those dlls were not found it tries to load them from plugin folder and does NOT cache them.
So the solution for me was to remove those dlls from GameServer folder.0 -
Hi @Djebedia,
Sorry plugin.config is for v5 only.
My colleague Ilya is on vacation for this week and the next.
If I have to guess, I think you could disable this (shadow copying) caching and hot reload thing via PhotonServer.config under Application nodes, in this case for GameServer:- RestartDelayMilliseconds
- WatchFiles
- ExcludeFiles
- EnableShadowCopy
- EnableAutoRestart
- ForceAutoRestart
Read more here or here.0