You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After an add-in is uninstalled, e.g. the Night Vision add-in, on the next launch the add-in is still registered even though some files are missing:
Pinta: Failed to initialize add-in
System.IO.FileNotFoundException: Could not load file or assembly 'NightVisionAddin, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'NightVisionAddin, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null'
---> System.IO.FileNotFoundException: Could not load file or assembly '/Users/cameron/Library/Application Support/Pinta/addins/addins/NightVisionEffect.1.3.2/NightVisionAddin.dll'. The system cannot find the file specified.
File name: '/Users/cameron/Library/Application Support/Pinta/addins/addins/NightVisionEffect.1.3.2/NightVisionAddin.dll'
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Mono.Addins.AddinEngine.CurrentDomainAssemblyResolve(Object sender, ResolveEventArgs args) in /Users/cameron/code/mono-addins/Mono.Addins/Mono.Addins/AddinEngine.cs:line 324
at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)
at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, Boolean throwOnFileNotFound)
at System.Reflection.TypeNameParser.ResolveAssembly(String assemblyName)
at System.Reflection.TypeNameParser.GetType(String typeName, ReadOnlySpan`1 nestedTypeNames, String assemblyNameIfAny)
at System.Reflection.TypeNameParser.Parse()
at System.Reflection.TypeNameParser.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Assembly requestingAssembly, Boolean throwOnError, Boolean ignoreCase, Boolean extensibleParser)
at System.Type.GetType(String typeName, Boolean throwOnError)
at Mono.Addins.RuntimeAddin.GetType(String typeName, Boolean throwIfNotFound) in /Users/cameron/code/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:line 338
at Mono.Addins.TypeExtensionNode.get_Type() in /Users/cameron/code/mono-addins/Mono.Addins/Mono.Addins/TypeExtensionNode.cs:line 104
at Mono.Addins.TypeExtensionNode.CreateInstance() in /Users/cameron/code/mono-addins/Mono.Addins/Mono.Addins/TypeExtensionNode.cs:line 93
at Mono.Addins.InstanceExtensionNode.GetInstance() in /Users/cameron/code/mono-addins/Mono.Addins/Mono.Addins/InstanceExtensionNode.cs:line 76
at Mono.Addins.ExtensionNodeEventArgs.get_ExtensionObject() in /Users/cameron/code/mono-addins/Mono.Addins/Mono.Addins/ExtensionContext.cs:line 1331
at Pinta.MainWindow.OnExtensionChanged(Object s, ExtensionNodeEventArgs args) in /Users/cameron/code/Pinta/Pinta/MainWindow.cs:line 273
The text was updated successfully, but these errors were encountered:
From my investigation there are a couple issues here:
The satellite assemblies from translations are automatically packaged by mautil but aren't listed as file dependencies of the add-in. The uninstall action leaves these files behind, which causes it to fail to remove the add-in directory. The add-in file scanning then thinks an add-in is present since the folders still exist
The add-in removal also doesn't go through the normal process if the assemblies are loaded - in this case the add-in files are flagged for removal on the next run. This code path only removes the files and doesn't clear out the add-in folder, also causing the same issue with the add-in not being removed properly. This is somewhat related to RunPendingUninstalls not cleaning up empty directories mono/mono-addins#56
The first issue should be fixable by explicitly listing the satellite assemblies in the add-in manifest, but the second issue may require forking Mono.Addins, since the upstream repository now seems to be archived / read-only ...
After an add-in is uninstalled, e.g. the Night Vision add-in, on the next launch the add-in is still registered even though some files are missing:
The text was updated successfully, but these errors were encountered: