diff --git a/build/CI.sln b/build/CI.sln
index 3a2b91852e..d8b7c2b8f8 100644
--- a/build/CI.sln
+++ b/build/CI.sln
@@ -48,6 +48,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "actions", "actions", "{A9B9
..\.github\actions\docker-test\action.yml = ..\.github\actions\docker-test\action.yml
EndProjectSection
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{960DC223-117E-41DE-8A89-C85E3D69A8E8}"
+ ProjectSection(SolutionItems) = preProject
+ ..\tests\scripts\test-global-tool.sh = ..\tests\scripts\test-global-tool.sh
+ ..\tests\scripts\test-msbuild-task.sh = ..\tests\scripts\test-msbuild-task.sh
+ ..\tests\scripts\test-native-tool.sh = ..\tests\scripts\test-native-tool.sh
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile
index 3aad2f600a..2fc29abadd 100644
--- a/build/docker/Dockerfile
+++ b/build/docker/Dockerfile
@@ -15,5 +15,6 @@ FROM $REGISTRY/gittools/build-images:$DISTRO-runtime-$DOTNET_VERSION
WORKDIR /tools
COPY --from=installer /tools .
+RUN git config --global --add safe.directory '*'
ENTRYPOINT ["/tools/dotnet-gitversion"]
diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props
index 6dcbd6a482..e741039f04 100644
--- a/new-cli/Directory.Packages.props
+++ b/new-cli/Directory.Packages.props
@@ -3,7 +3,7 @@
true
-
+
@@ -18,4 +18,4 @@
-
\ No newline at end of file
+
diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props
index fd242deedb..e040210d5f 100644
--- a/src/Directory.Packages.props
+++ b/src/Directory.Packages.props
@@ -5,7 +5,7 @@
-
+
diff --git a/tests/scripts/test-global-tool.sh b/tests/scripts/test-global-tool.sh
index 19074f4834..913920bca6 100644
--- a/tests/scripts/test-global-tool.sh
+++ b/tests/scripts/test-global-tool.sh
@@ -16,6 +16,7 @@ do
shift
done
+git config --global --add safe.directory '*'
result=$(dotnet tool install GitVersion.Tool --version $version --tool-path /tools --add-source $nugetPath) # >/dev/null
status=$?
if test $status -eq 0
diff --git a/tests/scripts/test-msbuild-task.sh b/tests/scripts/test-msbuild-task.sh
index 8ce41d4f76..e17b5a46fc 100644
--- a/tests/scripts/test-msbuild-task.sh
+++ b/tests/scripts/test-msbuild-task.sh
@@ -19,6 +19,7 @@ do
shift
done
+git config --global --add safe.directory '*'
result=$(dotnet build $repoPath --source $nugetPath --source https://api.nuget.org/v3/index.json -p:GitVersionMsBuildVersion=$version -p:TargetFrameworks=$targetframework) # >/dev/null
status=$?
if test $status -eq 0
diff --git a/tests/scripts/test-native-tool.sh b/tests/scripts/test-native-tool.sh
index 262d8efcac..bc92984886 100644
--- a/tests/scripts/test-native-tool.sh
+++ b/tests/scripts/test-native-tool.sh
@@ -16,6 +16,7 @@ do
shift
done
+git config --global --add safe.directory '*'
result=$(tar -xvpf /native/gitversion-$runtime-$version.tar.gz -C /native) # >/dev/null
status=$?
if test $status -eq 0
@@ -23,4 +24,4 @@ then
/native/gitversion $repoPath /showvariable FullSemver;
else
echo $result
-fi
\ No newline at end of file
+fi