question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

System.MissingMethodException at spriteBatch.DrawRectangle()

See original GitHub issue

Used MonoGame version: MonoGame.Framework.DesktopGL.Core 3.8.0.13 Myra version: 0.9.9.202 Exception details: System.MissingMethodException: "Method not found: 'Void Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw(Microsoft.Xna.Framework.Graphics.Texture2D, System.Nullable`1<Microsoft.Xna.Framework.Vector2>, System.Nullable`1<Microsoft.Xna.Framework.Rectangle>, System.Nullable`1<Microsoft.Xna.Framework.Rectangle>, System.Nullable`1<Microsoft.Xna.Framework.Vector2>, Single, System.Nullable`1<Microsoft.Xna.Framework.Vector2>, System.Nullable`1<Microsoft.Xna.Framework.Color>, Microsoft.Xna.Framework.Graphics.SpriteEffects, Single)'." Occurs at spriteBatch.End() call. Possible reason: some obsolete overloads of Draw method were removed due to reduntancy. FillRectangle works just fine. (Btw, it’s my first issue on github. Tell if I need to provide additional info or structurize it other way.)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
rds1983commented, May 11, 2020

Thanks for the report. Definitely it should be fixed before next release.

0reactions
E-Sh4rkcommented, Aug 23, 2020

@rds1983 With 1.0.1.209 it works! 👍 Thank you 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

SpriteBatch Method Missing exception in PCL
Begin(). Whenever I run the code and it gets to the spriteBatch.Begin() line, the compiler ends up throwing a System.MissingMethodException.
Read more >
Draw Rectangle in XNA using SpriteBatch
I am trying to draw a rectangle shape in XNA using spritebatch. I have the following code: Texture2D rect = new Texture2D(graphics.
Read more >
Weird behavior with XNA SpriteBatch.Draw origin
Draw() 's arguments make as much sense as is possible. Consider the process of drawing this sprite. Using your rectangle with position and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found