-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting NETSDK1023 even when xunit.assert isn't implicitly referenced #13798
Comments
[main] Update dependencies from dotnet/arcade - Work around dotnet/arcade#13798
@agocke can you help here? |
ping @agocke :) |
Could I get a binlog from the efcore build? I looked through the source and the reason wasn't obvious. |
Steps:
|
Also, when using CPM, adding this to
causes
|
Those are implicitly referenced here: arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnit/XUnit.targets Lines 9 to 11 in bd749a1
Seems like those targets are imported here: https://github.com/dotnet/arcade/blob/bd749a18dd72b8fcb5257ae01a4faf6dd487cc5f/src/Microsoft.DotNet.Arcade.Sdk/tools/Tests.targets#L15-L23C6 I guess you're meant to just set XUnitVersion. It seems this goes back to this change by @AndyGerlicher 6b1db29 which explicitly mentions doing this to work better with CPM. |
The problem is that we still need to reference those packages and set the version to avoid errors https://github.com/dotnet/efcore/blob/release/9.0/test/EFCore.Specification.Tests/EFCore.Specification.Tests.csproj#L62-L64 |
As far as I can see, there's nothing strange about the Arcade usage of implicit package references here. The two possible questions are:
Regarding (1), this configuration long predates my involvement, and the "official" support for implicit references seems to indicate this is a supported scenario. I don't see anything necessarily wrong with Arcade's behavior here. For (2), this is a question for the NuGet team. I'm closing this as not relevant for the Arcade repo. This can be re-opened as a NuGet issue if (2) is in question. |
After a130eb4, we're seeing some unusual behavior in the EF Core specification tests (tests that ship as NuGet packages for providers to use).
We have these lines in our csproj:
The error messages that started showing up after the arcade commit are as follows:
However, if I comment out the
PackageReference
s I get compiler errors saying that it can't find xUnit.net types.For now, I've worked around the issue by adding
<NoWarn>NETSDK1023</NoWarn>
, but it would be good to understand whyIsImplicitlyDefined="true"
is affecting this project when the package reference clearly isn't being added outside of the project.Release Note Category
Release Note Description
The text was updated successfully, but these errors were encountered: