From 49d670e9683cb9b61f5f07321e71480c14eb90fd Mon Sep 17 00:00:00 2001 From: wuyangfan Date: Mon, 25 May 2026 16:28:35 +0800 Subject: [PATCH] fix: fall back to src-relative snk when SolutionDir is unset (#848) Allow `dotnet test path/to/csproj` to resolve the shared assembly key from Directory.Build.props via MSBuildThisFileDirectory when SolutionDir is not provided by the build. --- src/Directory.Build.props | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 4eff7b00..a3b70db2 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -20,7 +20,9 @@ https://cloud.githubusercontent.com/assets/5763993/26522718/d16f3e42-4330-11e7-9b78-f8c7402624e7.png MIT true - $(SolutionDir)/Mapster/Mapster.snk + + $(SolutionDir)Mapster/Mapster.snk + $(MSBuildThisFileDirectory)Mapster/Mapster.snk true Mapper;AutoMapper;Fast;Mapping icon.png