FileNotFoundException while using the getting started guide

Hi all,

i'm running through the step-by-step guide on a clean 2019 server that hosts the Photon Server.
The server itself runs fine and when i included the test plugin i wrote, i see an error in the log file.
it seems the path is somehow malformed ?

plugin.config:
<root>
  <PluginSettings Enabled="True">
    <Plugins>
      <Plugin
            Name="TestPlugins"
            Version=""
            AssemblyName="TestPlugins.dll"
            Type="TestPlugins.PluginFactory"
            BaseUrl="http://localhost:55557/realtime-webhooks-1.2"
            IsPersistent="true"
            AsyncJoin="False"
            HasErrorInfo="true"
            PathClose="GameClose"
            PathCreate="GameCreate"
            PathEvent="GameEvent"
            PathGameProperties="GameProperties"
            PathJoin="GameJoin"
            PathLeave="GameLeave"
            PathLoad="GameCreate" />
		<Plugin
			Name="Testplugin"
			AssemblyName="Testplugin.dll"
			Type="Testplugin.MyPluginFactory" />
    </Plugins>
  </PluginSettings>
</root>

Log file:
2021-06-02 22:18:57,157 [1] INFO  Photon.Hive.Plugin.PluginManager - Plugin configured: name=Testplugin
2021-06-02 22:18:57,188 [1] DEBUG Photon.Hive.Plugin.PluginManager - Plugin path is set to 'C:\Users\stef\Desktop\photon-server\deploy\Plugins/Testplugin//bin/Testplugin.dll'
2021-06-02 22:18:57,220 [1] ERROR Photon.Hive.Plugin.PluginManager - Got Exception during either loading of assembly C:\Users\stef\Desktop\photon-server\deploy\Plugins/Testplugin//bin/Testplugin.dll or type Testplugin.MyPluginFactory. Exception Msg: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
   at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
   at System.Reflection.Assembly.LoadFile(String path)
   at Photon.Hive.Plugin.PluginManager.SetupPluginManager(String path, String typeName, Dictionary`2 config)

i have copied both the Testplugin.dll and PhotonHivePlugin.dll to the Testplugin\bin folder as double slash should be replaced by a single slash.

Could it be that the forward slashes are causing issues ?

i've searched your forum on the FileNotFoundException but didn't get anything relevant.

Thanks for your time.

Stef

Comments

  • Closing this topic... stupid me put the plugin folder in the wrong directory ... src-server/plugins instead of deploy/plugins... sorry boys :) hope this helps someone save some time.
This discussion has been closed.