-
Notifications
You must be signed in to change notification settings - Fork 253
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
Milestone
Comments
Oh hey, I came here exactly for this :) |
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
This is included in our latest preview bits. |
This is shipped with Microsoft.NET.Test.Sdk v16.10.0 and MSTest v2.2.4**. |
You break MSTest / WPF with that, but no one is interested in that for 10 month now? 👎 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: