MapsterMapper / Mapster

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

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

Closed Gaven-F closed 8 months ago

Gaven-F commented 9 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 9 months ago

This part is a garbled screenshot. image


This is a screenshot of my configuration. image image

stagep commented 9 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 9 months ago

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

HEBOS commented 2 months ago

This doesn't work for me.

stagep commented 2 months ago

Open a new issue and provide some details of the exceptions you are getting. Include the Mapster version from your .csproj and the version in .config/dotnet-tools.json.