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

WinUI3 + MSTest #708

Closed
azchohfi opened this issue Apr 25, 2020 · 6 comments · Fixed by #782 or #813
Closed

WinUI3 + MSTest #708

azchohfi opened this issue Apr 25, 2020 · 6 comments · Fixed by #782 or #813
Milestone

Comments

@azchohfi
Copy link
Contributor

azchohfi commented Apr 25, 2020

Description

Today, UWP applications are based on .Net Native.
Soon, UWP applications will also be able to use .Net Core 5 (dotnet/runtime#35318).
This is a great evolution of the platform, but at the same time, requires a few changes to existing libraries, such as MSTest.

If a WinUI3 project references MSTest, instead of using the uap10.0 assemblies (which now should be deprecated), it will use the netstandard1.0 ones, which does not encapsulate the Microsoft.VisualStudio.TestTools.UnitTesting.AppContainer namespace (which contains the very useful UITestMethodAttribute), and creates a Main method, which conflicts with WinUI3's.
Also, the current implementation of UITestMethodAttribute uses CoreDispatcher, not the DispatcherQueue, which is preferred, as CoreDispatcher will not work on Win32.

Steps to reproduce

Use WinUI3 and MSTest on the same sdk style .Net Core 5 project

Expected behavior

MSTest works with WinUI3 (both inside and outside of a container - UWA or Win32), providing a UITestMethodAttribute and properly running tests both thru appxrecipe or a simple .Net Core 5 exe.

Actual behavior

Project does not build, and impossible to run the tests

@stevenbrix
Copy link

stevenbrix commented Jun 8, 2020

Oh hey, I came here exactly for this :)

@azchohfi
Copy link
Contributor Author

Related PRs:
#782
#813

Still working on it!

@Haplois
Copy link
Contributor

Haplois commented Apr 20, 2021

Related microsoft/vstest#2852 merged. I will update the TP version used in this repo after the completion of the signed build.

This was linked to pull requests Apr 20, 2021
@Haplois Haplois added this to the 16.10.0 milestone Apr 20, 2021
@Haplois
Copy link
Contributor

Haplois commented Apr 22, 2021

This is included in our latest preview bits.

@Haplois
Copy link
Contributor

Haplois commented Jun 13, 2021

This is shipped with Microsoft.NET.Test.Sdk v16.10.0 and MSTest v2.2.4**.

@Haplois Haplois closed this as completed Jun 13, 2021
@mikeKuester
Copy link

You break MSTest / WPF with that, but no one is interested in that for 10 month now? 👎

#851

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 a pull request may close this issue.

4 participants