I want to run unit tests on my view models, services, etc. on my .NET 7 MAUI app. I following this, but it s for .NET 6 so I found this which is for .NET 7 but it seems both use the same process. Anyway, I followed the steps after adding net7.0
to my target framework, all my nuget packages get removed and when trying to build, I get these errors:
error NETSDK1005: Assets file C:...projectobjproject.assets.json doesn t have a target for net7.0 . Ensure that restore has run and that you have included net7.0 in the TargetFrameworks for your project.
error NU1201:项目与净额7.0(NETCoreApp,Version=v7.0)不兼容。 项目不支持任何目标框架。
main project:
<TargetFrameworks>net7.0;net7.0-android33.0</TargetFrameworks> <OutputType Condition=" $(TargetFramework) != net7.0 ">Exe</OutputType>
xUnit project:
<TargetFramework>net7.0</TargetFramework>
有人建议卸载/重载我的项目,重新启用演播室视觉,我尝试了这种视力,但没有奏效。 我如何确定这一点?