Skip to content

Conversation

@nguerrera
Copy link
Contributor

@nguerrera nguerrera commented Jan 31, 2025

For a period, there was breaking SDK change with PrivateAssets="all" stripping things from the build deps.json. It's been reverted 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.

For a period, there was breaking SDK change with `PrivateAssets="all"` stripping things from the build `deps.json`. It's been [reverted](dotnet/sdk#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.
@nguerrera nguerrera merged commit 6e1d738 into microsoft:main Jan 31, 2025
8 checks passed
@nguerrera nguerrera deleted the fix-9.0.200-preview branch January 31, 2025 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants