From ac13095a974a587ba06df088191f6ea9058d7e38 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Fri, 31 Jan 2025 13:18:03 -0600 Subject: [PATCH] build: fix dotnet test on certain 9.0.200-preview builds For a period, there was breaking SDK change with `PrivateAssets="all"` stripping things from the build `deps.json`. It's been [reverted](https://github.com/dotnet/sdk/pull/46182) but that revert hasn't made it to preview builds of VS yet. While this breaking change is around, having a `PrivateAssets="all"` reference to `Microsoft.NET.Test.Sdk` causes: ``` Testhost process for source(s) 'D:\Src\cask\bld\bin\Cask.Tests\debug_net8.0\Cask.Tests.dll' exited with error: Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.TestPlatform.CoreUtilities, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.` ``` There's no real reason for our `Microsoft.NET.Test.Sdk` reference to have `PrivateAssets="all"` and removing it works around the issue, so this change removes it. --- src/Tests/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tests/Directory.Build.props b/src/Tests/Directory.Build.props index e538b83..5e67813 100644 --- a/src/Tests/Directory.Build.props +++ b/src/Tests/Directory.Build.props @@ -2,7 +2,7 @@ - +