aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2022-09-30 23:48:33 -0700
committerRob Mensching <rob@firegiant.com>2022-10-03 12:29:27 -0700
commited6593322d34ff0e655be9347f340d0cc96c0784 (patch)
treef74f8dfb4ca4212d160cffba64d46fc3c4cc3e76
parentbd05b603142673135ac66cdbc81a2ae3028cb37f (diff)
downloadwix-ed6593322d34ff0e655be9347f340d0cc96c0784.tar.gz
wix-ed6593322d34ff0e655be9347f340d0cc96c0784.tar.bz2
wix-ed6593322d34ff0e655be9347f340d0cc96c0784.zip
Use packageSourceMapping to control source of NuGet packages
Contrary to common-sense, NuGet package sources are not ordered. Thus, the existence of nuget_official.config is pointless as it was an attempt to prefer already published .nupkgs over newly built .nupkgs in post-GA builds. Instead, NuGet introduced packageSourceMapping which is a more powerful solution to address post-GA package resolution.
-rw-r--r--nuget.config11
-rw-r--r--src/Directory.Build.props2
-rw-r--r--src/build_official.cmd2
-rw-r--r--src/nuget_official.config12
4 files changed, 11 insertions, 16 deletions
diff --git a/nuget.config b/nuget.config
index 2151ef89..34dfa486 100644
--- a/nuget.config
+++ b/nuget.config
@@ -7,6 +7,15 @@
7 <clear /> 7 <clear />
8 <add key="nuget" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> 8 <add key="nuget" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
9 <add key="build" value="build\artifacts" /> 9 <add key="build" value="build\artifacts" />
10 <!-- <add key="github" value="https://nuget.pkg.github.com/wixtoolset/UnifiedTest1/index.json" /> -->
11 </packageSources> 10 </packageSources>
11
12 <packageSourceMapping>
13 <packageSource key="nuget">
14 <package pattern="*" />
15 </packageSource>
16 <packageSource key="build">
17 <package pattern="WixToolset.*" />
18 <package pattern="WixBuildTools.*" />
19 </packageSource>
20 </packageSourceMapping>
12</configuration> 21</configuration>
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 8e013300..90de177c 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -6,7 +6,7 @@
6 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 6 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7 <EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink> 7 <EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink>
8 <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> 8 <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
9 <NoWarn>$(NoWarn);NU1507;MSB3026</NoWarn> 9 <NoWarn>$(NoWarn);MSB3026</NoWarn>
10 10
11 <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName> 11 <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
12 <RootBuildFolder>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\))</RootBuildFolder> 12 <RootBuildFolder>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\))</RootBuildFolder>
diff --git a/src/build_official.cmd b/src/build_official.cmd
index 63566260..56c2a708 100644
--- a/src/build_official.cmd
+++ b/src/build_official.cmd
@@ -1,8 +1,6 @@
1@setlocal 1@setlocal
2@pushd %~dp0 2@pushd %~dp0
3 3
4@copy nuget_official.config ..\nuget.config
5
6build_all.cmd Release Official 4build_all.cmd Release Official
7 5
8@popd 6@popd
diff --git a/src/nuget_official.config b/src/nuget_official.config
deleted file mode 100644
index 25adbeed..00000000
--- a/src/nuget_official.config
+++ /dev/null
@@ -1,12 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<configuration>
3 <config>
4 <add key="repositoryPath" value="packages" />
5 </config>
6 <packageSources>
7 <clear />
8 <add key="nuget" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
9 <!-- <add key="github" value="https://nuget.pkg.github.com/wixtoolset/UnifiedTest1/index.json" /> -->
10 <add key="build" value="build\artifacts" />
11 </packageSources>
12</configuration>