3.8.1 Cant see Microsoft.Xna.Framework

I’m new to Monogame and i’m new to programming.
When i add package Monogame.Framework.WindowsDX,i find that i cant use the namespace of Microsoft.Xna.xxx

And when i change the package to Monogame.Framework.DesktopGL,it works

Then i try the monogame template with windowDX,it also works well.

Why? Do i miss some nuget package or some setting? (I have clear nuget cache and restart VS2022 several times, no works)

And i also find MonoGame.Framework.WindowsDX v3.8 works well with VS2019.

How can i get MonoGame v3.8.1 windowsDX works well with VS2022, Help!

If this is a project you are updating from v3.8 then make sure the Target Framework for your project is set to .NET 6.0

No updating,its a new class library project with .NET 6.0

I expanded my classs library project and MonoGame template project, i find that my class library project’s nuget package miss something, i try to add SharpDX related nuget package to my project , but no works. Is there something wrong with MonoGame.Framework.WindowsDX nuget package ?