Skip to content
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

[tests] fix F5 for Windows device tests #22835

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

jonathanpeppers
Copy link
Member

If you try to F5 the Windows device tests, you'll get an error:

Error (active) APPX1101 Payload contains two or more files with the same destination path 'xunit.runner.utility.netcoreapp10.dll'. Source files:
...\Microsoft.Maui.Cache\NuGet\packages\xunit.runner.visualstudio\2.8.0\build\net6.0\xunit.runner.utility.netcoreapp10.dll
...\Microsoft.Maui.Cache\NuGet\packages\xunit.runner.utility\2.6.6\lib\netcoreapp1.0\xunit.runner.utility.netcoreapp10.dll	Controls.DeviceTests (net8.0-windows10.0.19041.0)
...\Microsoft.Maui.Cache\NuGet\packages\microsoft.windowsappsdk\1.5.240311000\buildTransitive\Microsoft.Build.Msix.Packaging.targets

This is due to dotnet/arcade using:

https://github.com/dotnet/arcade/blob/2c08708d18855f2e2779ac5d0623a5978751c4f3/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnit/XUnit.targets#L13

For now, let's set $(DisableArcadeTestFramework) and it won't import XUnit.targets from arcade.

After these changes, I can F5 again.

If you try to F5 the Windows device tests, you'll get an error:

    Error (active) APPX1101 Payload contains two or more files with the same destination path 'xunit.runner.utility.netcoreapp10.dll'. Source files:
    ...\Microsoft.Maui.Cache\NuGet\packages\xunit.runner.visualstudio\2.8.0\build\net6.0\xunit.runner.utility.netcoreapp10.dll
    ...\Microsoft.Maui.Cache\NuGet\packages\xunit.runner.utility\2.6.6\lib\netcoreapp1.0\xunit.runner.utility.netcoreapp10.dll	Controls.DeviceTests (net8.0-windows10.0.19041.0)
    ...\Microsoft.Maui.Cache\NuGet\packages\microsoft.windowsappsdk\1.5.240311000\buildTransitive\Microsoft.Build.Msix.Packaging.targets

This is due to dotnet/arcade using:

https://github.com/dotnet/arcade/blob/2c08708d18855f2e2779ac5d0623a5978751c4f3/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnit/XUnit.targets#L13

For now, let's set `$(DisableArcadeTestFramework)` and it won't import
`XUnit.targets` from arcade.

After these changes, I can F5 again.
@Eilon
Copy link
Member

Eilon commented Jun 4, 2024

I'm not familiar with the details of this, but I tested it locally and it enables me to run tests locally in VS. Without this change, main does not work due to the error mentioned in the PR description.

@PureWeen
Copy link
Member

PureWeen commented Jun 4, 2024

  • Failing test is unrelated

@PureWeen PureWeen merged commit 78b9840 into dotnet:main Jun 4, 2024
47 of 49 checks passed
@jonathanpeppers jonathanpeppers deleted the FixWindowsDeviceTests branch June 4, 2024 20:26
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants