MapsterMapper / Mapster

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

Mapster.Tool not compatible with .NET 6 #483

Closed alegreenp closed 1 year ago

alegreenp commented 2 years ago

Hi, I'm developing an API with .NET 6.0 and I'm trying to install Mapster.Tool but i get these errors:

The combination of project-package for Mapster.Tool 8.4.0-pre03 is not valid. Project style DotnetToolReference can only contain references of DotnetTool type.

Package 'Mapster.Tool 8.4.0-pre03' contains a package 'DotnetTool' that is not supported by project 'MyProject'.

NU1202 Package Mapster.Tool 8.4.0-pre03 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Mapster.Tool 8.4.0-pre03 supports:

Anybody can help me? I already tried with others versions but it doesn't work.

borbiuk commented 2 years ago

You are trying to install Mapster.Tool as nuget package but it should be installed other way. see docs

  1. dotnet new tool-manifest
  2. dotnet tool install Mapster.Tool
  3. dotnet mapster [args]