{"action":"created","issue":{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/134","labels_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/134/comments","events_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/134/events","html_url":"https://github.com/JimBobSquarePants/ImageProcessor/issues/134","id":59775920,"number":134,"title":"Loading of all assemblies when loading an image","user":{"login":"cosmo0","id":3973850,"avatar_url":"https://avatars.githubusercontent.com/u/3973850?v=3","gravatar_id":"","url":"https://api.github.com/users/cosmo0","html_url":"https://github.com/cosmo0","followers_url":"https://api.github.com/users/cosmo0/followers","following_url":"https://api.github.com/users/cosmo0/following{/other_user}","gists_url":"https://api.github.com/users/cosmo0/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmo0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmo0/subscriptions","organizations_url":"https://api.github.com/users/cosmo0/orgs","repos_url":"https://api.github.com/users/cosmo0/repos","events_url":"https://api.github.com/users/cosmo0/events{/privacy}","received_events_url":"https://api.github.com/users/cosmo0/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/labels/3%20-%20Done","name":"3 - Done","color":"CCCCCC"},{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/labels/enhancement","name":"enhancement","color":"009800"},{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-03-04T10:11:21Z","updated_at":"2015-07-07T09:46:07Z","closed_at":"2015-04-16T22:07:50Z","body":"I just noticed this when running the app in debug mode: \r\nhttps://github.com/JimBobSquarePants/ImageProcessor/blob/master/src/ImageProcessor/Configuration/ImageProcessorBootstrapper.cs#L80\r\n\r\nWe have about 100 DLLs in there. Some of them are C++ (non-.Net) DLLs, so it throws a bunch of errors. Some of them weigh more than 10Mb. This doesn't seem very optimized... :/\r\nI understand that you want to discover the available formats without explicitly linking or listing them, but is there a way to filter the loaded DLLs ?"},"comment":{"url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/comments/119142327","html_url":"https://github.com/JimBobSquarePants/ImageProcessor/issues/134#issuecomment-119142327","issue_url":"https://api.github.com/repos/JimBobSquarePants/ImageProcessor/issues/134","id":119142327,"user":{"login":"gabrielius","id":7396135,"avatar_url":"https://avatars.githubusercontent.com/u/7396135?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielius","html_url":"https://github.com/gabrielius","followers_url":"https://api.github.com/users/gabrielius/followers","following_url":"https://api.github.com/users/gabrielius/following{/other_user}","gists_url":"https://api.github.com/users/gabrielius/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielius/subscriptions","organizations_url":"https://api.github.com/users/gabrielius/orgs","repos_url":"https://api.github.com/users/gabrielius/repos","events_url":"https://api.github.com/users/gabrielius/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielius/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T09:46:07Z","updated_at":"2015-07-07T09:46:07Z","body":"Basically, I have two environments:\r\n- Mine\r\n- Client's. \r\n\r\nI am *not* experiencing problems, my client *does*.\r\n\r\nI have an **App**, **Library**, **AutoMapper**. \r\n\r\n*App* references *Library*, which one method uses *AutoMapper*. However, *App* never calls that method, so *App* works on my PC *without* *AutoMapper*. Nevertheless, my client gets an exception, which StackTrace is below.\r\n\r\nI use \"2.2.6.0\" version of ImageProcessor. Both, client and me use .NET Framework 4.5.\r\n\r\n````\r\nSystem.AggregateException: One or more errors occurred. ---> System.IO.FileLoadException: Could not load file or assembly 'AutoMapper, Version=3.3.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) ---> 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.\r\n   --- End of inner exception stack trace ---\r\n   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)\r\n   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)\r\n   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)\r\n   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)\r\n   at ImageProcessor.Common.Helpers.TypeFinder.GetAllAssemblies()\r\n   at ImageProcessor.Common.Helpers.TypeFinder.GetFilteredAssemblies(IEnumerable`1 excludeFromResults, String[] exclusionFilter)\r\n   at ImageProcessor.Common.Helpers.TypeFinder.GetAssembliesWithKnownExclusions(IEnumerable`1 excludeFromResults)\r\n   at ImageProcessor.Configuration.ImageProcessorBootstrapper.LoadSupportedImageFormats()\r\n   at ImageProcessor.Configuration.ImageProcessorBootstrapper..ctor()\r\n   at ImageProcessor.Configuration.ImageProcessorBootstrapper.<.cctor>b__8()\r\n   at System.Lazy`1.CreateValue()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Lazy`1.get_Value()\r\n   at ImageProcessor.Imaging.Formats.FormatUtilities.GetFormat(Stream stream)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at MyClass.ImageManipulation.Rotate(Byte[] imageData, Single degrees) in C:\\Source\\ImageManipulation.cs:line 31\r\n````"}}