我有一个Visual Studio解决方案,其中包含各种示例控制台应用程序项目。其中之一是MapsterSample,我正在尝试Mapster,并按照GitHub https://github.com/MapsterMapper/Mapster/wiki/Mapster.Tool上描述的步骤生成映射代码。
看起来一切都很好,除了我发出命令的那部分:
dotnet msbuild -t:Mapster这会导致对解决方案中的每个项目执行该命令,即使在Package Manager Console中选择了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项目的命令?
发布于 2021-05-14 13:27:40
确保您的解决方案中存在该项目。
确保名称Mapster拼写正确。
确保您的终端位于正确的目录中。(理想情况下,您应该位于Mapster的.csproj所在目录之上的目录中。
https://stackoverflow.com/questions/67528987
复制相似问题