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
PS C:\Users\Chris\source\repos\JobScrape.Backend> dotnet mapster mapper -a JobScrape.Backend\obj\Debug\net6.0\JobScrape.Backend.dll
Produces this Exception:
Unhandled exception. System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load file or assembly 'MediatR.Contracts, Version=1.0.1.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2'. Invalid pointer (0x80004003 (E_POINTER))
Could not load file or assembly 'MediatR, Version=11.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2'. Invalid pointer (0x80004003 (E_POINTER))
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at Mapster.TypeAdapterConfig.<>c.b__87_0(Assembly assembly) in C:\Projects\Mapster\src\Mapster\TypeAdapterConfig.cs:line 639
at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() at System.Linq.Enumerable.SelectManySingleSelectorIterator2.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Mapster.TypeAdapterConfig.Scan(Assembly[] assemblies) in C:\Projects\Mapster\src\Mapster\TypeAdapterConfig.cs:line 639 at Mapster.Tool.Program.GenerateMappers(MapperOptions opt) in C:\Projects\Mapster\src\Mapster.Tool\Program.cs:line 65 at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult1 result, Action`1 action)
at Mapster.Tool.Program.Main(String[] args) in C:\Projects\Mapster\src\Mapster.Tool\Program.cs:line 17
System.IO.FileLoadException: Could not load file or assembly 'MediatR.Contracts, Version=1.0.1.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2'. Invalid pointer (0x80004003 (E_POINTER))
File name: 'MediatR.Contracts, Version=1.0.1.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2'
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Mapster.Tool.AssemblyResolver.OnResolving(AssemblyLoadContext context, AssemblyName name) in C:\Projects\Mapster\src\Mapster.Tool\AssemblyResolver.cs:line 54
at System.Runtime.Loader.AssemblyLoadContext.GetFirstResolvedAssemblyFromResolvingEvent(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
System.IO.FileLoadException: Could not load file or assembly 'MediatR, Version=11.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2'. Invalid pointer (0x80004003 (E_POINTER))
File name: 'MediatR, Version=11.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2'
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Mapster.Tool.AssemblyResolver.OnResolving(AssemblyLoadContext context, AssemblyName name) in C:\Projects\Mapster\src\Mapster.Tool\AssemblyResolver.cs:line 54
at System.Runtime.Loader.AssemblyLoadContext.GetFirstResolvedAssemblyFromResolvingEvent(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
Closing this as I assume the interface was referencing MediatoR in some way, causing Mapster attempting to load MediatoR assemblies. Let me know if this was not the case.
PS C:\Users\Chris\source\repos\JobScrape.Backend> dotnet mapster mapper -a JobScrape.Backend\obj\Debug\net6.0\JobScrape.Backend.dll
Produces this Exception:
Unhandled exception. System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load file or assembly 'MediatR.Contracts, Version=1.0.1.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2'. Invalid pointer (0x80004003 (E_POINTER))
Could not load file or assembly 'MediatR, Version=11.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2'. Invalid pointer (0x80004003 (E_POINTER))
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at Mapster.TypeAdapterConfig.<>c.b__87_0(Assembly assembly) in C:\Projects\Mapster\src\Mapster\TypeAdapterConfig.cs:line 639
at System.Linq.Enumerable.SelectArrayIterator
2.MoveNext() at System.Linq.Enumerable.SelectManySingleSelectorIterator
2.ToList()at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source) at Mapster.TypeAdapterConfig.Scan(Assembly[] assemblies) in C:\Projects\Mapster\src\Mapster\TypeAdapterConfig.cs:line 639 at Mapster.Tool.Program.GenerateMappers(MapperOptions opt) in C:\Projects\Mapster\src\Mapster.Tool\Program.cs:line 65 at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult
1 result, Action`1 action)at Mapster.Tool.Program.Main(String[] args) in C:\Projects\Mapster\src\Mapster.Tool\Program.cs:line 17
System.IO.FileLoadException: Could not load file or assembly 'MediatR.Contracts, Version=1.0.1.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2'. Invalid pointer (0x80004003 (E_POINTER))
File name: 'MediatR.Contracts, Version=1.0.1.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2'
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Mapster.Tool.AssemblyResolver.OnResolving(AssemblyLoadContext context, AssemblyName name) in C:\Projects\Mapster\src\Mapster.Tool\AssemblyResolver.cs:line 54
at System.Runtime.Loader.AssemblyLoadContext.GetFirstResolvedAssemblyFromResolvingEvent(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
System.IO.FileLoadException: Could not load file or assembly 'MediatR, Version=11.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2'. Invalid pointer (0x80004003 (E_POINTER))
File name: 'MediatR, Version=11.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2'
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Mapster.Tool.AssemblyResolver.OnResolving(AssemblyLoadContext context, AssemblyName name) in C:\Projects\Mapster\src\Mapster.Tool\AssemblyResolver.cs:line 54
at System.Runtime.Loader.AssemblyLoadContext.GetFirstResolvedAssemblyFromResolvingEvent(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
My Normal Setup looks like this:
DTOs and Extension Methods get generated on build, Mappers don't
Packages include
The text was updated successfully, but these errors were encountered: