Skip to content

Fix NU1701 warning Fixes #7212#7226

Merged
Forgind merged 2 commits into
dotnet:mainfrom
Forgind:fix-NU1701-warning
Jan 7, 2022
Merged

Fix NU1701 warning Fixes #7212#7226
Forgind merged 2 commits into
dotnet:mainfrom
Forgind:fix-NU1701-warning

Conversation

@Forgind
Copy link
Copy Markdown
Contributor

@Forgind Forgind commented Jan 6, 2022

That project references Xunit.Core (because it needs xunit types), which defines IsTestProject=true. Then Arcade's tests.targets checks that and imports XUnit.targets

https://github.com/dotnet/arcade/blob/98018d5a808e5167a4ce5e81dc6513382676d4c9/src/Microsoft.DotNet.Arcade.Sdk/tools/Tests.targets#L83

which adds a reference to xunit.runner.visualstudio

https://github.com/dotnet/arcade/blob/98018d5a808e5167a4ce5e81dc6513382676d4c9/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnit/XUnit.targets#L10

even though that's not really needed.

Fixes #7212

All credit to @rainersigwald (see the bug). I just tested it.

That project references Xunit.Core (because it needs xunit types), which defines IsTestProject=true. Then Arcade's tests.targets checks that and imports XUnit.targets

https://github.com/dotnet/arcade/blob/98018d5a808e5167a4ce5e81dc6513382676d4c9/src/Microsoft.DotNet.Arcade.Sdk/tools/Tests.targets#L83

which adds a reference to xunit.runner.visualstudio

https://github.com/dotnet/arcade/blob/98018d5a808e5167a4ce5e81dc6513382676d4c9/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnit/XUnit.targets#L10

even though that's not really needed.
Comment thread src/Xunit.NetCore.Extensions/Xunit.NetCore.Extensions.csproj Outdated
Co-authored-by: Rainer Sigwald <raines@microsoft.com>
@Forgind Forgind merged commit cc0492c into dotnet:main Jan 7, 2022
@Forgind Forgind deleted the fix-NU1701-warning branch January 7, 2022 22:31
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.

Suppress NU1701 warning?

2 participants