MonoGame and Visual Basic

Unfortunately with the SDK installed and restarted I still have the errors. Have I installed the right thing? Windows 10 SDK Standalone?

I’m not 100% sure about the Standalone SDK. I just installed it with VS2015. https://msdn.microsoft.com/library/windows/apps/dn609832.aspx

I’m having a real blonde day! Yes of course the SDK is part of the VS install, and yes it’s all installed and up to date. Not sure what the standalone has added, if anything.

I don’t understand where the System.Runtime problem is coming in.

@MuntyScruntFundle, I think i messed up the project when I cleaned it up. I was getting the same error. I remade the project and uploaded it to the same location. Try grabbing it again and testing it. Otherwise, I can just walk you through what I did to get it up and running.

Getting there, now there are only 136 errors! Reference required to mscorlib and Missing Core Assembly. And a few warnings about System.Reflection, Monogame, MicrosoftXNA, Framework doesn’t contain any public member or cannot be found.

Well, Monogame is installed, so is XNA.

I’m afraid fault finding this is a bit beyond me. I really do appreciate your help though.

OK, then do this:

  1. File->New->Project->VB->Windows->Universal->Blank App
  2. Add nuget packages: MonoGame.WindowsUAP, SharpDX, SharpDX.Direct3D11, and SharpDX.Direct2D1
  3. Then drop in the Game1 and MainPage classes from my template
  4. Profit!

If any of these steps fail, particularly step 1, 2, or 5, then there’s more going on than just a faulty template. Unfortunately, detailed VB debugging is not my forte. I haven’t written VB in 15 years.

I’ll have a go at this later today and post back for you. :o)

Hi Vogles. Well, after a fair bit of jiggering and pokering I think I’m almost there. I’ve checked all the nugets, they’ve all ended up in my references for some reason. I’ve created new classes and copied over your Game1 and MainPage code.

I have one error now:
‘C:\blahblah…\MonoGame.Framework.WindowsUAP\3.4.0.459\lib\netcore\Monogame.Framework\MonoGame.Framework.xr.xml’ does not exist.

Any ideas?

Yeah, that’s a really silly issue I’ve run into in the past, but only when manually adding the references. I’ve never received that error using Nugets.

So, the solution is to go into that folder that it’s talking about. Under netcore, you’ll find the file the compiler is complaining about. just move/copy it to a folder named Monogame.Framework under the netcore directory. That should fix it.

I have a CornFlowerBlue screen! Yay!

Thank you so much for your help. I will try moving everything over from my XNA project tomorrow. I’ll let you know how it goes.

Cheers!

Perfect! Glad I can help.

Unfortunately trying to move my code from the old XNA project to the Monogame project isn’t working at all, the Monogame.Framework references ok but doesn’t give any support for any of it’s members. The project is also not connecting or binding to Microsoft modules correctly, there’s no support for basic functions, although the name spaces are imported.

I don’t suppose you still have a copy of the original version you spoke of?

How would I go about putting a request in for better VB support?

I don’t think it’s so much a need for VB support. .Net isn’t C# vs VB. The same libraries work just as well for both languages. The lack of “VB support” comes from the contributors being mainly C# (and whatever other languages they personally know). My ability to answer your questions come from my limited time writing VB6 code 15 years ago and just applying my C# knowledge to a VB syntax. So for the most part, you should be able to just grab a C# example and just translate the code to a VB syntax and it should (in theory) work.

What I can do for you is write a slightly more “complex” sample. Hopefully that’ll help you out. Unfortunately, I might not be able to provide said sample until next week. I’m planning on participating in the Global Game Jam, so there goes my weekend.

Haha, happy weekend!

I would be most grateful, although I could transcribe C# example, it wouldn’t be in an app with all the references in place.

The sample I tried today was missing simple command stuff like RND and other basic stuff, although all the imports were in place. So that confused me. Also the Monogame.Framework was imported, but it wasn’t picking it up at all.

When I asked about VB support, what I meant was a Starter Template in the New Project form as there is with C#. Now of course that’s really just an empty name space, I guess if you could get a template working for me I could copy it to the right location anyway.

I can’t thank you enough for your help on this. I’m itching to get started properly but I fear I’m a bit long in the tooth to start doing battle with (())()('s!!

Hey @MuntyScruntFundle,

So I updated the zip on my OneDrive. It doesn’t do much more, simply renders a texture (MonoGame logo) and moves it across the screen, then wraps it around when it leaves the edge of the viewport.

https://onedrive.live.com/redir?resid=61EAAB8E9F5BA8D9!34889&authkey=!ADZvhU1ydvQnsAo&ithint=file%2Czip

Thank Vogles. Unfortunately I have 194 Errors this time. Could you post a picture of your solution explorer with the references block expanded?

I just followed the steps I mentioned here: MonoGame and Visual Basic

Then added the monogame logo to the content folder and moved it around in the SampleGame class.

This is really bizarre. I’m starting to wonder if things aren’t installed correctly.

Could you list, or link all the things that need to be installed for Mono? I have mono installed and it references fine, but something obviously isn’t right. I really don’t understand why, when I start a blank project, then drop in your modules it doesn’t work. Even more strange why I lose connection with some really basic functionality.

Please let me know about the install list and I’ll continue trying to get this working.

Thanks again Vogles.

Hi Vogles, I think I might be getting somewhere. I’m currently trying to manually build a new template, trying to reference XamlGame in the MainPage.xaml is failing. But, I can’t see see XamlGame in your sample I downloaded.

Where and what is it? I’m assuming it should be see in the Solution Explorer? If so could you please post the file for me to import?

Thanks.

I’ve sorted that problem, but now when adding the game=xamlGame initialisation in Sub New of MainPage, I can’t find anything that matches your swapChainBackgroundPanel of “dinglepops”.

I wonder where the dinglepops have gone!