Mapster: Mapster + .net 5.0.1 error MSB3073

Mapster v7.0.1 and v7.0.0 with .net 5.0.1 have error and Mapster v7.0.1 with .net 5.0.0 have same error: Error MSB3073 The command "dotnet mapster model -a abc.dll exited with code -532462766"

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 15

Most upvoted comments

Your sample does !not work on Windows 10 64x + VS 2019 16.9.0 Preview 2.0

with this project settings:

  <Target Name="Mapster" AfterTargets="AfterBuild">
    <Exec WorkingDirectory="$(ProjectDir)\Models" Command="dotnet tool restore" />
    <Exec WorkingDirectory="$(ProjectDir)\Models" Command="dotnet mapster model -a $(TargetDir)$(ProjectName).dll" />
    <Exec WorkingDirectory="$(ProjectDir)\Models" Command="dotnet mapster extension -a $(TargetDir)$(ProjectName).dll" />
    <Exec WorkingDirectory="$(ProjectDir)\Models" Command="dotnet mapster mapper -a $(TargetDir)$(ProjectName).dll" />
  </Target>
  

Really sorry, I tried this on my machine, it also works. I have no idea where problem is.

I’m wondering when you said .NET 5.0 works, how you switch between version? Currently, when I typed dotnet --version, I got 5.0.101.

I just uploaded Mapster.Tool 7.0.3 fix this problem.