simelation / simhub-plugins

Plugins for SimHub
MIT License
15 stars 8 forks source link

Could not load plugin #16

Closed Manu343726 closed 1 year ago

Manu343726 commented 1 year ago

I have been using a previous version of the plugin for two years (really nice work by the way) with no issue. It seems there is a missing WPF dll (Or maybe it is a mitmaching .NET version), Anyway, Im using simhub 8.2.0 and version 0.10.0 of this plugin *The latest release, the one from September 13),

These are the simhub logs:

[2022-12-17 20:15:03,678] INFO - Loading plugins controls
[2022-12-17 20:15:03,738] ERROR - An error occured while loading plugin settings control for SLI Plugin: System.Windows.Markup.XamlParseException: Could not load file or assembly 'WpfAutoGrid, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'WpfAutoGrid, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at System.Windows.Baml2006.Baml2006SchemaContext.ResolveAssembly(BamlAssembly bamlAssembly)
   at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlTypeToType(BamlType bamlType)
   at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType bamlType, Int16 typeId)
   at System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16 typeId)
   at System.Windows.Baml2006.Baml2006Reader.Process_ElementStart()
   at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
   at System.Windows.Baml2006.Baml2006Reader.Process_BamlRecords()
   at System.Windows.Baml2006.Baml2006Reader.Read()
   at System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector)
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   --- End of inner exception stack trace ---
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at SimElation.Simhub.SliPlugin.SliPluginControl.InitializeComponent()
   at SimElation.Simhub.SliPlugin.SliPlugin.GetWPFSettingsControl(PluginManager pluginManager)
   at SimHubWPF.MainWindow.<>c__DisplayClass56_0.<LoadPluginsControls>b__0()
lukester1975 commented 1 year ago

OK thanks, haven't upgraded to 8.2.0 so will do and see what the problem is...

lukester1975 commented 1 year ago

Quick hack fix: https://github.com/simelation/simhub-plugins/releases/tag/%40simelation%2Fsimhub-sli-plugin%400.11.0

Longer term I should probably stop using WpfAutoGrid.

Thanks!

Manu343726 commented 1 year ago

It's working again. Thank you.