question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mapster.tool does not support .net 6

See original GitHub issue

mapster.tool does not support .net 6, I got this error:

1>Could not load file or assembly ‘System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. The system cannot find the file specified. 1> at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) 1> at System.Reflection.RuntimeModule.GetTypes() 1> at System.Reflection.Assembly.GetTypes() 1> at Mapster.Tool.Extensions.Scan(CodeGenerationConfig config, Assembly assembly) in D:\git\Mapster\src\Mapster.Tool\Extensions.cs:line 177 1> at Mapster.Tool.Program.GenerateModels(ModelOptions opt) in D:\git\Mapster\src\Mapster.Tool\Program.cs:line 146 1> at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult1 result, Action1 action) 1> at Mapster.Tool.Program.Main(String[] args) in D:\git\Mapster\src\Mapster.Tool\Program.cs:line 17

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
devreepietcommented, Feb 21, 2022

Hello,

I am new to this conversation, but followed it quite closely. I can confirm that it works on net6.0 now.

Good job @andrerav.

1reaction
Philippe-Lavalcommented, Jan 13, 2022

The Mapster.Tool.exe tool from the last nuget is not working (at least if you have net6.0 SDK installed on your computer - in my case a Macintosh). So I changed the source code (PR) to have my build of the tool working : Here is how I managed to generate code (using my build of Mapster.Tool.exe). I left usage of the Nuget tool for later when the Nuget version will work too but I don’t see any PR being applied. The project seems dead ?

// How to generate code with Mapster.Tool.exe // cd C:\Users\philippe\source\repos\Philippe-Laval\TestMapster\TestMapster.Dto // C:\Users\philippe\source\repos\Philippe-Laval\Mapster\src\Mapster.Tool\bin\Debug\net6.0\Mapster.Tool.exe model -a “C:\Users\philippe\source\repos\Philippe-Laval\TestMapster\TestMapster.Dto\bin\Debug\net6.0\TestMapster.Dto.dll” -n TestMapster.Dtos.Dtos -o Dtos // C:\Users\philippe\source\repos\Philippe-Laval\Mapster\src\Mapster.Tool\bin\Debug\net6.0\Mapster.Tool.exe extension -a “C:\Users\philippe\source\repos\Philippe-Laval\TestMapster\TestMapster.Dto\bin\Debug\net6.0\TestMapster.Dto.dll” -n TestMapster.Dtos.Dtos -o Dtos // C:\Users\philippe\source\repos\Philippe-Laval\Mapster\src\Mapster.Tool\bin\Debug\net6.0\Mapster.Tool.exe mapper -a “C:\Users\philippe\source\repos\Philippe-Laval\TestMapster\TestMapster.Dto\bin\Debug\net6.0\TestMapster.Dto.dll” -n TestMapster.Dtos.Mappers -o Mappers

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mapster.EFCore does not support .net 6 · Issue #394
Mapster.EFCore does not support .net 6 #394 ... (where nullable is not defined). I just wanted to use mapster.tool and start using mapster....
Read more >
Releases · MapsterMapper/Mapster
This release finally resolves the long awaited support for .NET 6.0 in Mapster and Mapster.Tool! Fresh packages can be downloaded from ...
Read more >
Enjoy Using Mapster in .Net 6
IRegister is an interface in Mapster library so it implemented to allow mappings to be found when scanning assemblies and place mappings is...
Read more >
Mapster.Tool 8.3.0
Tool to generate object mapping using Mapster.
Read more >
Mapster.Tool fails generating mapper
The problem seems to be a class derived from CosmosClient - which i get from a nuget package. I get this exception: Cannot...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found