From XNA to Monogame 3.7

Hi,

I’m attempting to translate a game I create many years ago with XNA to the latest stable version of Monogame.

In the process I found the following bugs:

  • ‘BlendState’ does not contain a definition for ‘None’
  • ‘GraphicsDevice’ does not contain a definition for ‘ResolveBackBuffer’ and no accessible extension method ‘ResolveBackBuffer’ accepting a first argument of type ‘GraphicsDevice’ could be found (are you missing a using directive or an assembly reference?)
  • The name ‘SaveStateMode’ does not exist in the current context
  • The type or namespace name ‘ResolveTexture2D’ could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name ‘Storage’ does not exist in the namespace ‘Microsoft.Xna.Framework’ (are you missing an assembly reference?)
  • The type or namespace name ‘StorageContainer’ could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name ‘StorageDevice’ could not be found (are you missing a using directive or an assembly reference?)
  • ‘Guide’ does not contain a definition for ‘BeginShowStorageDeviceSelector’
  • ‘Guide’ does not contain a definition for ‘EndShowStorageDeviceSelector’

Any help here would be appreciated.

Are you sure those are parts of XNA and not custom content?

The old project in XNA 3.
I suffered too. Reconstruct under XNA 4.0. It will be so simpler to pass to Monogame.

Hi, yes, that’s XNA 3.0.

I have just solved part of it, but these issues remain:

  • The type or namespace name ‘Storage’ does not exist in the namespace ‘Microsoft.Xna.Framework’ (are you missing an assembly reference?)
  • The type or namespace name ‘StorageContainer’ could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name ‘StorageDevice’ could not be found (are you missing a using directive or an assembly reference?)
  • ‘Guide’ does not contain a definition for ‘BeginShowStorageDeviceSelector’
  • ‘Guide’ does not contain a definition for ‘EndShowStorageDeviceSelector’

Which dlls should I include to reference Storage, StorageContainer and StorageDevice?

Anyone? I cannot find a solution for this issue.

Hey @Ultrahead. It seems your game was written for XNA 3. MonoGame implements the XNA 4.0 API.
Here’s a migration cheatsheet: https://web.archive.org/web/20110217153321/http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/

EDIT: Oops, didn’t read down

1 Like

The Storage classes where removed from MonoGame: https://github.com/MonoGame/MonoGame/issues/4311

1 Like

Thanks for the links.

One more question: cannot get to install the XACT tool with XNA’s redistributable file on Windows 10. Is there any way to get it? (w/o the XDK)

I found this link: https://www.gamefromscratch.com/post/2015/07/23/Installing-XNA-Tools-Like-XACT-without-Visual-Studio-2010.aspx
Hope that works for you :slight_smile:

EDIT: oh, that’s probably what you already tried, man I’m messing up in this thread :sweat_smile:
You might also try MXA, which I’ve used to install XNA with VS2017 before: http://flatredball.com/visual-studio-2017-xna-setup/

2 Likes

It worked! Thanks!!!

I had to change the compression format from ADPCM to PCM for Windows since the former threw an exception with SharpDX (similar to this thread: https://github.com/MonoGame/MonoGame/issues/4446)

2 Likes