MapsterMapper / Mapster

A fast, fun and stimulating object to object Mapper
MIT License
4.23k stars 325 forks source link

The tool doesn't seem to work on net8.0 #674

Closed Gaven-F closed 4 months ago

Gaven-F commented 4 months ago

I have just used Mapster, and I think it is very powerful, but I seem to have discovered a problem, that is: using the mapster tool to generate dto in net8.0, this operation does not work, you need to adjust the target framework to 7.0 or 6.0. Can.

In addition, I am from China. When using mapster tool, the prompt information it outputs will be garbled (as far as I know, it should be the reason why gbk is converted to utf-8). I have not found a solution so far. I hope it can output correct Chinese or It's okay to output English as long as it's not garbled. 😢

I will attach some screenshots below.

Gaven-F commented 4 months ago

This part is a garbled screenshot. image


This is a screenshot of my configuration. image image

stagep commented 4 months ago

You need to use the pre-release versions of Mapster for .Net 8. If you are using Visual Studio then select "Include prerelease" when managing your Nuget packages. This will install 7.4.1-pre01. For Mapster.Tool at the Developer command prompt, first uninstall the current version with

dotnet tool uninstall Mapster.Tool

and then install the pre-release version with

dotnet tool install Mapster.Tool --version 8.4.1-pre01

Gaven-F commented 4 months ago

Okay, I get it, I'll go take a look