about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-12-03 05:27:19 +0100
committerGitHub <noreply@github.com>2022-12-03 05:27:19 +0100
commit02e6e7a535564c076b8ccfe2b7993bb8ee50c700 (patch)
tree2f02325341df1364fad12bf8768f5de638ca8b3c /pkgs/build-support
parenteac8b5156554857a82f581d2274ea192bf773235 (diff)
parent96cc5f97c75988c01db7732b06c5cef20bb0f429 (diff)
Merge pull request #202765 from mdarocha/roslyn-update
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh
index 10067cf088244..3479f58bb38c5 100644
--- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh
+++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh
@@ -26,6 +26,18 @@ dotnetConfigureHook() {
 
     (( "${#projectFile[@]}" == 0 )) && dotnetRestore
 
+    # Generate a NuGet.config file to make sure everything,
+    # including things like <Sdk /> dependencies, is restored from the proper source
+cat <<EOF > "./NuGet.config"
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <packageSources>
+    <clear />
+    <add key="nugetSource" value="@nugetSource@/lib" />
+  </packageSources>
+</configuration>
+EOF
+
     for project in ${projectFile[@]} ${testProjectFile[@]-}; do
         dotnetRestore "$project"
     done