Null error in EffectResources.cs
See original GitHub issueStarted 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:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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”.
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.