我有一个包含各种示例控制台应用程序项目的 Visual Studio 解决方案。其中之一是 MapsterSample,我在其中试用 Mapster,并按照 GitHub https://github.com/MapsterMapper/Mapster/wiki/Mapster.Tool上描述的步骤生成映射代码。
一切似乎都很好,除了我发出命令的部分:
dotnet msbuild -t:Mapster
即使在包管理器控制台中选择 MapsterSample 作为默认项目,这也会导致为解决方案中的每个项目执行命令:
SampleSolution\FirstSample\FirstSample.csproj : error MSB4057: The target "Mapster" does not exist in the project.
SampleSolution\SecondSample\SecondSample.csproj : error MSB4057: The target "Mapster" does not exist in the project.
... and so on
有没有办法只为 MapsterSample 项目执行命令?