Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins cannot be loaded #55

Closed
troplin opened this issue Apr 17, 2018 · 32 comments
Closed

Plugins cannot be loaded #55

troplin opened this issue Apr 17, 2018 · 32 comments

Comments

@troplin
Copy link

troplin commented Apr 17, 2018

Important questions

  • LogExpert Version: 1.6.10
  • Windows Version: Windows 10 Pro, Version 1709, OS Build 16299.371
  • Lokal file or Network: Local
  • Used Columnizer: Any plugin

Plugins are not loaded, the log contains a message like this for every plugin:

2018-04-17 09:52:49.3243|ERROR|LogExpert.PluginRegistry|C:\Program Files\LogExpert\plugins\CsvColumnizer.dllCould not load file or assembly 'CsvColumnizer, Version=1.6.10.0, Culture=neutral, PublicKeyToken=f1d21f1ddfe64bb0' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) System.IO.FileLoadException System.IO.FileLoadException: Could not load file or assembly 'CsvColumnizer, Version=1.6.10.0, Culture=neutral, PublicKeyToken=f1d21f1ddfe64bb0' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'CsvColumnizer, Version=1.6.10.0, Culture=neutral, PublicKeyToken=f1d21f1ddfe64bb0' ---> System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Program Files\LogExpert\plugins\CsvColumnizer.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Program Files\LogExpert\plugins\CsvColumnizer.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   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.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at LogExpert.PluginRegistry.ColumnizerResolveEventHandler(Object sender, ResolveEventArgs args)
   at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)


   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.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at LogExpert.PluginRegistry.LoadPlugins()

The message suggests that a DLL is loaded from a network location, but I fail to see what location that would be. I have simply copied the LogExpert folder into the local "Program Files" folder.

Complete log:
logexpert.log

@Otiel
Copy link

Otiel commented Apr 17, 2018

I'm getting the same error using the SftpFileSystem.dll provided in the latest release:

2018-04-17 17:37:40.4535|ERROR|LogExpert.PluginRegistry|C:\LogExpert\plugins\SftpFileSystem.dllCould not load file or assembly 'SftpFileSystem, Version=1.6.0.0, Culture=neutral, PublicKeyToken=4f1de4c770adbe0a' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) System.IO.FileLoadException System.IO.FileLoadException: Could not load file or assembly 'SftpFileSystem, Version=1.6.0.0, Culture=neutral, PublicKeyToken=4f1de4c770adbe0a' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'SftpFileSystem, Version=1.6.0.0, Culture=neutral, PublicKeyToken=4f1de4c770adbe0a' ---> System.IO.FileLoadException: Could not load file or assembly 'file:///C:\LogExpert\plugins\SftpFileSystem.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\LogExpert\plugins\SftpFileSystem.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   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.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at LogExpert.PluginRegistry.ColumnizerResolveEventHandler(Object sender, ResolveEventArgs args)
   at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)


   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.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at LogExpert.PluginRegistry.LoadPlugins()

@Otiel
Copy link

Otiel commented Apr 17, 2018

I fixed this issue by checking "Unblock" in the dll file properties:

image

But now, when opening the settings window, I'm getting this error:

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.


ReflectionTypeLoadException
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Module.FindTypes(TypeFilter filter, Object filterCriteria)
   at LogExpert.PluginRegistry.LoadPlugins()
   at LogExpert.PluginRegistry.GetInstance()
   at LogExpert.Dialogs.SettingsDialog.FillColumnizerList()
   at LogExpert.Dialogs.SettingsDialog.FillDialog()
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

And this error when opening a local file:

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.


ReflectionTypeLoadException
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Module.FindTypes(TypeFilter filter, Object filterCriteria)
   at LogExpert.PluginRegistry.LoadPlugins()
   at LogExpert.PluginRegistry.GetInstance()
   at LogExpert.LogWindow..ctor(LogTabWindow parent, String fileName, Boolean isTempFile, Boolean forcePersistenceLoading)
   at LogExpert.LogTabWindow.AddFileTab(String givenFileName, Boolean isTempFile, String title, Boolean forcePersistenceLoading, ILogLineColumnizer preProcessColumnizer, Boolean doNotAddToDockPanel)
   at LogExpert.LogTabWindow.LoadFiles(String[] names, Boolean invertLogic)
   at LogExpert.LogTabWindow.OpenFileDialog()
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

@zarunbal
Copy link
Owner

Have you only "Unblocked" e.g. the SftpFileSystem.dll or the ChilkatDotNet4.dll too?

@Otiel
Copy link

Otiel commented Apr 23, 2018

I unblocked only SftpFileSystem.dll

@zarunbal
Copy link
Owner

I think you have to unblock the ChilkatDotNet4.dll (This dll is loaded by the SftpFileSystem.dll). If you want to use the CSV you have to unblock also the LumenWorks.Framework.IO.dll.

@troplin
Copy link
Author

troplin commented Apr 24, 2018

Unblocking all DLLs worked for me. Now I'm running into issue #49.
Unblocking is a bit tedious though, because you cannot unblock multiple DLLs at a time.
Any idea why this is necessary at all? Is it because they are loaded dynamically?

@Otiel
Copy link

Otiel commented Apr 24, 2018

I think you have to unblock the ChilkatDotNet4.dll

I don't have this dll in the project folder. Where can it be found?

@Otiel
Copy link

Otiel commented Apr 24, 2018

Any idea why this is necessary at all? Is it because they are loaded dynamically?

Usually, Windows blocks the dll files when they're downloaded from Internet. More info can be found here (including how to unblock several files in one action).

@troplin
Copy link
Author

troplin commented Apr 24, 2018

Usually, Windows blocks the dll files when they're downloaded from Internet

Yeah, but the LogExpert.exe and the NLog.dll are also blocked and don't have to be unblocked as it seems.
Only the plugins seem to be affected.

@digideth
Copy link

digideth commented Jun 27, 2018

I can't use the app with SftpFileSystem.dll and ChilkatDotNet4.dll installed.

When I launch the app with the dll's installed I get the error window below:
2018-06-27_11-14-38

I also get the same error log as was mentioned in the first post by @troplin .

I've looked at the properties panel for both dll's and I don't have the "Unblock" check box that was mentioned by @Otiel

Any suggestions?

Thanks.

@Otiel
Copy link

Otiel commented Jun 28, 2018

Did you copy ChilkatDotNet4.dll and SftpFileSystem.dll under the plugins folder?

@digideth
Copy link

digideth commented Jul 2, 2018

@Otiel sure did.

@motowizlee
Copy link

motowizlee commented Nov 14, 2018

I can't use the app with SftpFileSystem.dll and ChilkatDotNet4.dll installed.

When I launch the app with the dll's installed I get the error window below:
2018-06-27_11-14-38

I also get the same error log as was mentioned in the first post by @troplin .

I've looked at the properties panel for both dll's and I don't have the "Unblock" check box that was mentioned by @Otiel

Any suggestions?

Thanks.

Facing the same issue with version 1.6.13. Noticed that if I only copy ChilkatDotNet4.dll the application runs good. If SftpFileSystem.dll is included the exception below is thrown when the application is launched.

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.


ReflectionTypeLoadException
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Module.FindTypes(TypeFilter filter, Object filterCriteria)
   at LogExpert.PluginRegistry.LoadPlugins()
   at LogExpert.PluginRegistry.GetInstance()
   at LogExpert.LogWindow..ctor(LogTabWindow parent, String fileName, Boolean isTempFile, Boolean forcePersistenceLoading)
   at LogExpert.LogTabWindow.AddFileTab(String givenFileName, Boolean isTempFile, String title, Boolean forcePersistenceLoading, ILogLineColumnizer preProcessColumnizer, Boolean doNotAddToDockPanel)
   at LogExpert.LogTabWindow.LogTabWindow_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

On closing of the application the following exception is thrown.

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.


ReflectionTypeLoadException
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Module.FindTypes(TypeFilter filter, Object filterCriteria)
   at LogExpert.PluginRegistry.LoadPlugins()
   at LogExpert.PluginRegistry.GetInstance()
   at LogExpert.LogExpertProxy.WindowClosed(LogTabWindow logWin)
   at LogExpert.LogTabWindow.LogTabWindow_Closing(Object sender, CancelEventArgs e)
   at System.Windows.Forms.Form.OnClosing(CancelEventArgs e)
   at System.Windows.Forms.Form.WmClose(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

@DanVi82
Copy link

DanVi82 commented Feb 4, 2019

When I try to open an URL to tail a remote file log i have the same exception

Impossibile caricare uno o più tipi richiesti. Per ulteriori informazioni, recuperare la proprietà LoaderExceptions.

ReflectionTypeLoadException
in System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
in System.Reflection.Module.FindTypes(TypeFilter filter, Object filterCriteria)
in LogExpert.PluginRegistry.LoadPlugins()
in LogExpert.PluginRegistry.GetInstance()
in LogExpert.LogWindow..ctor(LogTabWindow parent, String fileName, Boolean isTempFile, Boolean forcePersistenceLoading)
in LogExpert.LogTabWindow.AddFileTab(String givenFileName, Boolean isTempFile, String title, Boolean forcePersistenceLoading, ILogLineColumnizer preProcessColumnizer, Boolean doNotAddToDockPanel)
in LogExpert.LogTabWindow.LoadFiles(String[] names, Boolean invertLogic)
in LogExpert.LogTabWindow.openURIToolStripMenuItem_Click(Object sender, EventArgs e)
in System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
in System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
in System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
in System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
in System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
in System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.ToolStrip.WndProc(Message& m)
in System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

on version:
immagine

@sebastiansto
Copy link

sebastiansto commented Feb 25, 2019

For me it's the same as motowizlee. I have a problem with loading the SftpFileSystem.dll:

Mindestens ein Typ in der Assembly kann nicht geladen werden. Rufen Sie die LoaderExceptions-Eigenschaft ab, wenn Sie weitere Informationen benötigen.

ReflectionTypeLoadException
   bei System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   bei System.Reflection.Module.FindTypes(TypeFilter filter, Object filterCriteria)
   bei LogExpert.PluginRegistry.LoadPlugins()
   bei LogExpert.PluginRegistry.GetInstance()
   bei LogExpert.LogWindow..ctor(LogTabWindow parent, String fileName, Boolean isTempFile, Boolean forcePersistenceLoading)
   bei LogExpert.LogTabWindow.AddFileTab(String givenFileName, Boolean isTempFile, String title, Boolean forcePersistenceLoading, ILogLineColumnizer preProcessColumnizer, Boolean doNotAddToDockPanel)
   bei LogExpert.LogTabWindow.LogTabWindow_Load(Object sender, EventArgs e)
   bei System.Windows.Forms.Form.OnLoad(EventArgs e)
   bei System.Windows.Forms.Form.OnCreateControl()
   bei System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   bei System.Windows.Forms.Control.CreateControl()
   bei System.Windows.Forms.Control.WmShowWindow(Message& m)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.Form.WmShowWindow(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

@zarunbal
Copy link
Owner

Is this problem still active with the new release?

@DanVi82
Copy link

DanVi82 commented May 10, 2019 via email

@sebastiansto
Copy link

No, it works now. Thank you.

@Ryuichiro
Copy link

Ryuichiro commented May 15, 2019

I wrote my own plugin for the server logs of the company I work in and get the same errors if I copy the DLL into the plugins folder of an already existing LogExpert. The DLL is signed with the same key file as the other projects.

Created a PR in my fork in case you want to take a look, as I don't intend to merge into the project. Ryuichiro#1

Startup:

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.


ReflectionTypeLoadException
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Module.FindTypes(TypeFilter filter, Object filterCriteria)
   at LogExpert.PluginRegistry.LoadPlugins()
   at LogExpert.PluginRegistry.GetInstance()
   at LogExpert.LogTabWindow.FindFilenameForSettings(String fileName)
   at LogExpert.LogTabWindow.AddFileTab(String givenFileName, Boolean isTempFile, String title, Boolean forcePersistenceLoading, ILogLineColumnizer preProcessColumnizer, Boolean doNotAddToDockPanel)
   at LogExpert.LogTabWindow.LogTabWindow_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Closing:

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.


ReflectionTypeLoadException
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Module.FindTypes(TypeFilter filter, Object filterCriteria)
   at LogExpert.PluginRegistry.LoadPlugins()
   at LogExpert.PluginRegistry.GetInstance()
   at LogExpert.LogExpertProxy.WindowClosed(LogTabWindow logWin)
   at LogExpert.LogTabWindow.LogTabWindow_Closing(Object sender, CancelEventArgs e)
   at System.Windows.Forms.Form.OnClosing(CancelEventArgs e)
   at System.Windows.Forms.Form.WmClose(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

@zarunbal
Copy link
Owner

@Ryuichiro thanks for sharing your plugin. Could you Debug LogExpert and retrieve the LoaderException from the exception? With the Loader exception it should be possible to pin point the cause of the problem with the plugin

@Ryuichiro
Copy link

Ryuichiro commented May 16, 2019

If I build the whole thing everything works fine, the error just shows up when I put my DLL in a (tested only 1.7) release that wasn't built by me.

I guess that I overlooked some ID because I copied another plugin project, loaded it into the Solution, then refactored the classes and generated a new AssemblyInfo.

@zarunbal
Copy link
Owner

You could test the latest CI build. I integrated there some logging which should show the real problem in the log (see wiki
https://ci.appveyor.com/project/Zarunbal/logexpert/builds/24604292/artifacts

@zarunbal
Copy link
Owner

If possible please post your log or the complete exception. I'm interested what caused the LoaderException.

@Ryuichiro
Copy link

The located assembly's manifest definition does not match the assembly reference.

2019-05-17 14:45:02.0635|INFO|Program|
============================================================================
LogExpert 1.7.228 started.
============================================================================
2019-05-17 14:45:02.5223|ERROR|LogExpert.PluginRegistry|Plugin load failed with 'C:\Users\rober\Desktop\LogExpert.1.7.228\plugins\StarborneServerColumnizer.dll'Could not load file or assembly 'ColumnizerLib, Version=1.7.0.0, Culture=neutral, PublicKeyToken=4f1de4c770adbe0a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) System.IO.FileLoadException System.IO.FileLoadException: Could not load file or assembly 'ColumnizerLib, Version=1.7.0.0, Culture=neutral, PublicKeyToken=4f1de4c770adbe0a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'ColumnizerLib, Version=1.7.0.0, Culture=neutral, PublicKeyToken=4f1de4c770adbe0a' ---> System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


2019-05-17 14:45:02.5223|ERROR|LogExpert.PluginRegistry|Loader exception during load of dll 'C:\Users\rober\Desktop\LogExpert.1.7.228\plugins\StarborneServerColumnizer.dll'Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. System.Reflection.ReflectionTypeLoadException System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Module.FindTypes(TypeFilter filter, Object filterCriteria)
   at LogExpert.PluginRegistry.LoadPlugins()
2019-05-17 14:45:02.5372|FATAL|Program|System.Threading.ThreadExceptionEventArgs
2019-05-17 14:45:02.5372|FATAL|Program|System.Threading.ThreadExceptionEventArgs
2019-05-17 14:46:15.6517|ERROR|LogExpert.PluginRegistry|Plugin load failed with 'C:\Users\rober\Desktop\LogExpert.1.7.228\plugins\StarborneServerColumnizer.dll'The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) System.IO.FileLoadException System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
2019-05-17 14:46:15.6567|ERROR|LogExpert.PluginRegistry|Loader exception during load of dll 'C:\Users\rober\Desktop\LogExpert.1.7.228\plugins\StarborneServerColumnizer.dll'Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. System.Reflection.ReflectionTypeLoadException System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Module.FindTypes(TypeFilter filter, Object filterCriteria)
   at LogExpert.PluginRegistry.LoadPlugins()
2019-05-17 14:46:15.6567|FATAL|Program|System.Threading.ThreadExceptionEventArgs
2019-05-17 14:46:15.6567|FATAL|Program|System.Threading.ThreadExceptionEventArgs

@zarunbal
Copy link
Owner

Thanks for the log, now I understand it

The problem is the different key for signing during the build. I fix the build then it should be possible to develop custom plugins without problems with the release version.

zarunbal added a commit that referenced this issue May 17, 2019
added CleanPackage target
Removed depends on Clean from PrepareChocolateyTemplates #55
@zarunbal
Copy link
Owner

A new release is here. Please verify if the changes fixed the problems for you with the plugins. A short feedback if it works would be great

@Ryuichiro
Copy link

Works

@Hirogen
Copy link
Collaborator

Hirogen commented Jun 17, 2019

Awesome, could you please close the issue :)

@Ryuichiro
Copy link

Ryuichiro commented Jun 19, 2019

Nope, @troplin opened it. ^^
But @zarunbal should also be able to close it.

@troplin
Copy link
Author

troplin commented Jun 25, 2019

@zarunbal I still have to manually unblock all the plugins, is that expected?

@Hirogen
Copy link
Collaborator

Hirogen commented Jun 25, 2019

lly unblock all the plugins, is that expected?

with the inno setup installer this should not be needed anymore #117

@zarunbal
Copy link
Owner

I assume this bug is fixed. @troplin if you still have the problem with the blocked dlls please reopen the bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants