From b3c4f29c361e4f89f83dcf7b000541b09b70b883 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Wed, 23 Aug 2023 11:30:46 -0500 Subject: [PATCH] [build] set `$(DisableTransitiveFrameworkReferenceDownloads)` As we consume nightly .NET 8 builds, they sometimes depend on nightly .NET 7 builds. One error you can run into is: error NU1102: Unable to find package Microsoft.AspNetCore.App.Ref with version (= 7.0.11) error NU1102: Unable to find package Microsoft.WindowsDesktop.App.Ref with version (= 7.0.11) For projects that are not even ASP.NET or Windows desktop apps! To even be able to access these feeds, they would be something like: We don't currently track these packages, because we don't actually use them. The .NET SDK team has provided a setting to workaround this, `$(DisableTransitiveFrameworkReferenceDownloads)`, we have been using in xamarin/xamarin-android for some time: https://github.com/xamarin/xamarin-android/blob/6768c731d327c8148c45304c895ca8987a9cc2f1/Directory.Build.props#L26-L27 Let's do the same here to avoid this problem as seen in 81c228d1. --- Directory.Build.props | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index 314a40f53..07b121654 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,6 +7,8 @@ <_OutputPath>$(MSBuildThisFileDirectory)bin\Build$(Configuration)\ true true + + true 7.0 net$(DotNetTargetFrameworkVersion) true