Somfic / EliteVA

⚙️ VoiceAttack plugin for Elite: Dangerous. Use in-game events, variables and keybindings in your VoiceAttack macros!
https://docs.somfic.dev/projects/eliteva
MIT License
18 stars 3 forks source link

Plugin fails to start if EDDI also installed #7

Open UseLessUK opened 1 year ago

UseLessUK commented 1 year ago

Greetings,

The plugin fails to start with the following error being logged;

{
  "ClassName": "System.MissingMethodException",
  "Message": "Method not found: 'Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.OptionsServiceCollectionExtensions.AddOptions(Microsoft.Extensions.DependencyInjection.IServiceCollection)'.",
  "Data": null,
  "InnerException": null,
  "HelpURL": null,
  "StackTraceString": "   at Microsoft.Extensions.DependencyInjection.LoggingServiceCollectionExtensions.AddLogging(IServiceCollection services, Action`1 configure)\r\n   at Microsoft.Extensions.Hosting.HostBuilder.InitializeServiceProvider()\r\n   at Microsoft.Extensions.Hosting.HostBuilder.Build()\r\n   at EliteVA.VoiceAttack.Initialize(Object vaProxy) in D:\\a\\EliteVA\\EliteVA\\VoiceAttack.cs:line 65\r\n   at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)\r\n   at EliteVA.VoiceAttack.VA_Init1(Object vaProxy) in D:\\a\\EliteVA\\EliteVA\\VoiceAttack.cs:line 38",
  "RemoteStackTraceString": null,
  "RemoteStackIndex": 0,
  "ExceptionMethod": "8\nAddLogging\nMicrosoft.Extensions.Logging, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60\nMicrosoft.Extensions.DependencyInjection.LoggingServiceCollectionExtensions\nMicrosoft.Extensions.DependencyInjection.IServiceCollection AddLogging(Microsoft.Extensions.DependencyInjection.IServiceCollection, System.Action`1[Microsoft.Extensions.Logging.ILoggingBuilder])",
  "HResult": -2146233069,
  "Source": "Microsoft.Extensions.Logging",
  "WatsonBuckets": null,
  "MMClassName": null,
  "MMMemberName": null,
  "MMSignature": null
}

Are the two plugins ever likely to play nice together when both are installed?

Somfic commented 1 year ago

Hi,

This is a known issue which needs more looking into. It is my aim to make EDDI and EliteVA compatible, but they currently are not. I suspect that EDDI and EliteVA have mismatching dependency versions in the Microsoft.Extensions.DependencyInjection packages, which is causing this error. Odd thing is that this error occurs even if the EDDI plugin is disabled. The error is caused by the existence of the EDDI files.

EliteVA currently uses a "hacky" way to compile and link dependency dlls in order to properly be loaded in by VoiceAttack, so the whole process of getting EliteVA's dependencies to be loaded in by VoiceAttack is kind of messy.

I am looking into this issue, but it is not on high priority. Any help is appreciated, but currently you'll have to choose between either EDDI or EliteVA. I believe EliteVA to be feature-complete enough to serve as a viable alternative for EDDI as of now.