Trying to get an XNA project to work

Hi,

I have a .NET class library that references Microsoft.XNA.Framework (I think only because it uses the Vector2 class extensively), originally created at the time of XNA 4 (so I think around 2010?). When I open the solution in VS2019, it opens just fine, no migration errors and such, however it cannot find the Microsoft.XNA namespace. Adding the Monogame nuget packages that are also added in the Monogame instructions for setting up your dev environment doesn’t help. So my first question is: how do I reference the required Monogame dll’s or packages to have access to Microsoft.XNA?

My main game solution has several projects (Logic, GameComponents, Content, and the main Game), which reference the above class library. How do I reference an external library from inside a Monogame project (DesktopGL template)? There is no References folder or Add Reference command - maybe this has to do with this being based on .NET Core? Can I also have a regular .NET Framework Monogame solution/project?

In my old solution I had a few XNA projects (GameComponents that implemented Update and Draw, Content for images etc, and the main Game project), and a few regular class library projects with Logic that referenced XNA. What type of Monogame project would these have to be in the current situation in VS2019?

I have been trying and searching all night, but I just can’t even get any project to recognize the Microsoft.XNA namespace other than the project that was generated by the DeskTopGL template :frowning: .

Thanks for any answers or insights!

ZeusEQ / Patrick

Hi @ZeusEQ, Welcome to the Community!

Take a look at this post, nearer the bottom:

Happy Coding!

EDIT

Of course, you would pick the OpenGL or DX variants.

Thanks for your welcome and your quick reply!

However, I’m sorry, but I’m not sure what part exactly you’re pointing me at :-). I tried to go through the links on that page, but I don’t see anything that helps me with the questions above?

If that’s the case I misunderstood your issue, perhaps rephrase your question?

EDIT

Maybe post a screenshot of your solution explorer window.