-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
With the new design for multi target projects, we need to be able to unit test ViewModels stored in Maui projects.
We could move ViewModels into pure .net 6 projects, but dependencies that are defined in other multi target projects with platform specific implementations can't be mocked regardless without also moving the interfaces for those dependencies into .net 6 projects. That largely negates the positives of multi target projects if we have to create other projects just to contain the Interface definitions and view models.
Steps to Reproduce
Create a .NET Maui solution
Create a ViewModel to the .NET Maui project.
Create a unit test project and add a reference to the .NET Maui project.
Version with bug
Preview 10 (current)
Last version that worked well
Unknown/Other
Affected platforms
I was not able test on other platforms
Affected platform versions
All
Did you find any workaround?
Create another .net 6 project for view modals and interfaces that the tests and .net maui projects can reference.
That just doesn't scale well.
Relevant log output
No response