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.

Null error in EffectResources.cs

See original GitHub issue

Started a new project and started following your Getting Started video on your YouTube channel. At the point where you remove all the default stuff in Monogame such as the LoadContent and such. I run the project and I get a Null error in line 79 of EffectResources.cs Just wondering what the fix was. Here is where the error is.

internal static byte[] getMonoGameEmbeddedResourceBytes( string name )
        {
            #if FNA
            name = name.Replace( ".ogl.mgfxo", ".fxb" );
            #endif

            var assembly = ReflectionUtils.getAssembly( typeof( MathHelper ) );
            using( var stream = assembly.GetManifestResourceStream( name ) )
            {
                using( var ms = new MemoryStream() )
                {
                     ///here
                    stream.CopyTo( ms );
                    return ms.ToArray();
                }
            }
        }

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
jbhaywoodcommented, Jan 15, 2017

I ran into this exact error. Maybe the documentation can be more clear? Right now it says, “…the platform of your project doesnt matter.”, which doesn’t appear to be true. I had started with a “MonoGame Window Project”, but it sounds like Nez doesn’t work with that template. You need to use “MonoGame Cross Platform Desktop Project”.

2reactions
prime31commented, Jul 12, 2016

You have the DirectX version of the MonoGame SDK! If you start with the DesktopGL template it will give you the OpenGL version, which is what Nez requires.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting a value cannot be null error with my C# project
1 Answer 1 ... The next line of characters from the input stream, or null if no more lines are available. And: If...
Read more >
How to Handle the ArgumentNullException in C# | Rollbar
ArgumentNullException occurs when an invalid argument is passed to a method in C#. In this case, it refers to the passing of a...
Read more >
How do I fix this strange null error
Break that line down into individual statements, it will make it much easier to know exactly which bit has the problem. One of...
Read more >
Spammed with a Null Reference exception in Animator
Works fine in-game. However, my game started taking 20-50 seconds to load after this error began: NullReferenceException: Object reference not ...
Read more >
Correct a #NULL! error
This error is shown when you use an incorrect range operator in a formula, or when you use an intersection operator (space character)...
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