[kind of solved] how to run demos from monogame.extended ?

Hi. I’m newbie
I downloaded monogame.extended master branch and tried to run demos. but I failed.
I created a project and added some demo projects as " add existing…" to it. but it has errors.
could you tell an easy way to run single demo projects from monogame.extended (offline)?
what i want is to run demos in the monogame.extended and modify them to learn library.

Hmm, they should “just work” ™ but I’ll download it again, check it out and report back.

OK, just downloaded and checked out the latest in the MG.Extended source.

But, as it uses NuGet for all the related packages, you can’t “open” the solution for the first time offline as NuGet needs to restore the dependant packages.

Best thing to do is after you have cloned it, open it straight away and build the solution in the “Source” folder. This will recover the dependencies for the solution automatically (assuming you are using VS2013 with NuGet installed, or VS2015, any version will do)

Once built, simply right click the demo you want to run and set it as the “Startup project” or do Right-click on the project and select “Debug -> Start new instance”

I’ve noticed there are a few warnings and I’ve messaged the author about it, but you can safely ignore them and the demos still run fine.

1 Like

I opened MG.extended source solution and after restoring nugets, when I tried to build, I got bunch of errors( 324) and many of them are like “invalid token ; in class, struct or …” and “; expected " and so on. and other errors like " Failed to create importer 'TiledMapImporter…” and other errors.
I’m using vs 2013 with update 5
maybe it’s related to c# version or something?!
I feel I’m very far from solution.

If you are using VS2013. Then you will need to install NuGet manually from the VS “Tools -> Extensions and updates” wizard. Just search for NuGet and install the extension.

Alternately, visit NuGet.Org and follow the instructions from there.

NuGet is a dependency manager for solutions, which provides an online library of project dependencies and dll’s. Many projects publish their libraries there to help solutions find references.

Hope that helps.

1 Like

it’s already installed.

but it was outdated. so updated it to latest version(v2.12). but problem still exist.

Have you also installed MG 3.5?
Sorry, just clutching at straws, as I installed both MG 3.5 and cloned the latest branch of MG.Extended and whilst there were some warnings, there were no errors.

You might also try cloning the repo again to a clean folder to see if that helps.

Yes. I installed MG 3.5 and make some projects and examples. Even used monogame.extended(love it) and it’s template. My problem is only with MG.extended solution and it’s demos.
The weird part is that the Sprite.demo works, but can’t run other demos.

Yeah, this sounds like it. Building from source requires C# 6.0 and Portable Class Library support in your IDE.

Given this constraint, I don’t think it’s going to be easy to get working with VS2013. A quick google turns up this and this

Have you considered using the free VS2015 community edition?


with a quick glance on that and that, I Understood that it’s beyond my current capabilities(using C# 6.0 with VS2013.):grin:
So is it any easier way to run demos on VS 2013(I think the answer is no).
I make MG.extended projects without any problem.
why MG.extended demos shouldn’t work like a normal MG.extended template project?

recently I was thinking to VS 2015.

2 reasons:

  • we like to code in C# 6.0
  • you can use the MonoGame.Extended library in older versions of C# after it’s compiled. C# 6.0 is purely a syntax thing, it makes it nicer to write the code, but doesn’t change the end result.

Yes, do this. It’s worth it.

1 Like

It made me clear.