MaKiPL/OpenVIII-monogame

GraphicsDeviceManager is defined in an assembly that is not referenced

KandyMan1990 opened this issue · 4 comments

I have cloned the repo and followed the Getting Started for Windows section. When trying to run a build I get an error "The type 'GraphicsDeviceManager' is defined in an assembly that is not referenced. You must add a reference to assembly 'MonoGame.Framework, Version=3.7.1.189, Culture=neutral, PublicKeyToken=null'. Search C:\Users\KandyMan\Documents\GitHub\OpenVIII\Search\Program.cs Line 15".

When looking at the references dropdown in the Search project, MonoGame.Framework has a yellow triangle over it.

You may have not properly installed MonoGame. Did you choose development build? Do you have Visual Studio 2017 or 2019? Did you install additional NuGet packages (MonoGame.Framework)?

I downloaded from the link in the getting started section for MonoGame, I assume that was development build? I'm on VS 2017. NuGet packages in Core are all installed but there are none installed for Search. Should there be any?

Ok I added MonoGame.Framework desktop and portable to the search project and the error has gone, however now when I try to start the project I get "A project with an output type of Class Library cannot be started directly. In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project." Am I missing something? I've tried clicking start as well as start without debugging and get the same thing.

Major derp, was trying to run core. As soon as I switched to DirectX I got it running. Thanks for pointing to the NuGet packages for me.