Skip to main content
deleted 215 characters in body
Source Link

I've been experiencing a really Strange problem since recently, Every variablesofvariables of XNA Framework Game class seems not to be initialized before my extending Game1 () class. The Content manager and the Window that shouldVariables does not be null, but like after I've triedseem to add a dll pipeline (that makes my content pipeline crash bybe initialized before the way) everything started to go wrong like this problem. I've had this after trying to import a.fnt (did not work) and a localized Spritefontpoint where they should be.

I do not plan to change the game engine, but I'll appreciate any help of any kind.

Thanks for your time

here is my Game1 class (a small part of it)

public class Game1 : Game
{
  public static GraphicsDeviceManager graphics;
  public static SpriteBatch spriteBatch;
  public static ContentManager ContentManager;
  public static SceneManager SceneManager { get; private set; }
        
  public Game1()
  {
    ContentManager = Content;

    graphics = new GraphicsDeviceManager(this);
    ContentManager.RootDirectory = "Content";


    // TODO: Add your initialization logic here
    /*
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
    */
    Window.IsBorderless = true;
    graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
    graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
    IsMouseVisible = true;

  }

    (...) //The code continues
}

and here is the errors:

enter image description here

enter image description here

enter image description here

the Null pointer error on the Window variable occures when i declare a new Content manager


Edit:

It seem that there is a conflict between System.RunTime.Serialization v4 and v2 in my project

1>  Impossible de résoudre le conflit entre "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" et "System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes". Choix arbitraire de "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".

I've been experiencing a really Strange problem since recently, Every variablesof XNA Framework Game class seems not to be initialized before my extending Game1 () class. The Content manager and the Window that should not be null, but like after I've tried to add a dll pipeline (that makes my content pipeline crash by the way) everything started to go wrong like this problem. I've had this after trying to import a.fnt (did not work) and a localized Spritefont.

I do not plan to change the game engine, but I'll appreciate any help of any kind.

Thanks for your time

here is my Game1 class (a small part of it)

public class Game1 : Game
{
  public static GraphicsDeviceManager graphics;
  public static SpriteBatch spriteBatch;
  public static ContentManager ContentManager;
  public static SceneManager SceneManager { get; private set; }
        
  public Game1()
  {
    ContentManager = Content;

    graphics = new GraphicsDeviceManager(this);
    ContentManager.RootDirectory = "Content";


    // TODO: Add your initialization logic here
    /*
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
    */
    Window.IsBorderless = true;
    graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
    graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
    IsMouseVisible = true;

  }

    (...) //The code continues
}

and here is the errors:

enter image description here

enter image description here

enter image description here

the Null pointer error on the Window variable occures when i declare a new Content manager


Edit:

It seem that there is a conflict between System.RunTime.Serialization v4 and v2 in my project

1>  Impossible de résoudre le conflit entre "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" et "System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes". Choix arbitraire de "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".

I've been experiencing a really Strange problem since recently, Every variables of XNA Framework Game class seems not to be initialized before my extending Game1 class. Variables does not seem to be initialized before the point where they should be.

I do not plan to change the game engine, but I'll appreciate any help of any kind.

Thanks for your time

here is my Game1 class (a small part of it)

public class Game1 : Game
{
  public static GraphicsDeviceManager graphics;
  public static SpriteBatch spriteBatch;
  public static ContentManager ContentManager;
  public static SceneManager SceneManager { get; private set; }
        
  public Game1()
  {
    ContentManager = Content;

    graphics = new GraphicsDeviceManager(this);
    ContentManager.RootDirectory = "Content";


    // TODO: Add your initialization logic here
    /*
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
    */
    Window.IsBorderless = true;
    graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
    graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
    IsMouseVisible = true;

  }

    (...) //The code continues
}

and here is the errors:

enter image description here

enter image description here

enter image description here

the Null pointer error on the Window variable occures when i declare a new Content manager


Edit:

It seem that there is a conflict between System.RunTime.Serialization v4 and v2 in my project

1>  Impossible de résoudre le conflit entre "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" et "System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes". Choix arbitraire de "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
back to previous revision and added an error from the log
Source Link

Type 'Game' does not exists in 'Microsoft.XNA.framwork.Game Game(...)' parametters Content and Window are not pre initialized

EDIT:

now i've got this, it poped really randomly but now i can see where the whole problem is comming, i'm renaming the question

enter image description here

also the Following Nuget packages appeared:

  • Microsoft.XNA.FrameWork
  • Microsoft.XNA.FrameWork.Content.Pipeline
  • Microsoft.XNA.FrameWork.Game

i think they came from the Monogame.Extended.ContentPipeline package and this might cause the errors, if so i'll send it in answer


I've been experiencing a really Strange problem since recently, Every variablesof XNA Framework Game class seems not to be initialized before my extending Game1 () class. The Content manager and the Window that should not be null, but like after I've tried to add a dll pipeline (that makes my content pipeline crash by the way) everything started to go wrong like this problem. I've had this after trying to import a.fnt (did not work) and a localized Spritefont.

I do not plan to change the game engine, but I'll appreciate any help of any kind.

Thanks for your time

here is my Game1 class (a small part of it)

public class Game1 : Game
{
  public static GraphicsDeviceManager graphics;
  public static SpriteBatch spriteBatch;
  public static ContentManager ContentManager;
  public static SceneManager SceneManager { get; private set; }
        
  public Game1()
  {
    ContentManager = Content;

    graphics = new GraphicsDeviceManager(this);
    ContentManager.RootDirectory = "Content";


    // TODO: Add your initialization logic here
    /*
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
    */
    Window.IsBorderless = true;
    graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
    graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
    IsMouseVisible = true;

  }

    (...) //The code continues
}

and here is the errors:

enter image description here

enter image description here

enter image description here

the Null pointer error on the Window variable occures when i declare a new Content manager


Edit:

It seem that there is a conflict between System.RunTime.Serialization v4 and v2 in my project

1>  Impossible de résoudre le conflit entre "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" et "System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes". Choix arbitraire de "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".

Type 'Game' does not exists in 'Microsoft.XNA.framwork.Game (...)'

EDIT:

now i've got this, it poped really randomly but now i can see where the whole problem is comming, i'm renaming the question

enter image description here

also the Following Nuget packages appeared:

  • Microsoft.XNA.FrameWork
  • Microsoft.XNA.FrameWork.Content.Pipeline
  • Microsoft.XNA.FrameWork.Game

i think they came from the Monogame.Extended.ContentPipeline package and this might cause the errors, if so i'll send it in answer


I've been experiencing a really Strange problem since recently, Every variablesof XNA Framework Game class seems not to be initialized before my extending Game1 () class. The Content manager and the Window that should not be null, but like after I've tried to add a dll pipeline (that makes my content pipeline crash by the way) everything started to go wrong like this problem. I've had this after trying to import a.fnt (did not work) and a localized Spritefont.

I do not plan to change the game engine, but I'll appreciate any help of any kind.

Thanks for your time

here is my Game1 class (a small part of it)

public class Game1 : Game
{
  public static GraphicsDeviceManager graphics;
  public static SpriteBatch spriteBatch;
  public static ContentManager ContentManager;
  public static SceneManager SceneManager { get; private set; }
        
  public Game1()
  {
    ContentManager = Content;

    graphics = new GraphicsDeviceManager(this);
    ContentManager.RootDirectory = "Content";


    // TODO: Add your initialization logic here
    /*
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
    */
    Window.IsBorderless = true;
    graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
    graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
    IsMouseVisible = true;

  }

    (...) //The code continues
}

and here is the errors:

enter image description here

enter image description here

enter image description here

the Null pointer error on the Window variable occures when i declare a new Content manager

Game() parametters Content and Window are not pre initialized

I've been experiencing a really Strange problem since recently, Every variablesof XNA Framework Game class seems not to be initialized before my extending Game1 () class. The Content manager and the Window that should not be null, but like after I've tried to add a dll pipeline (that makes my content pipeline crash by the way) everything started to go wrong like this problem. I've had this after trying to import a.fnt (did not work) and a localized Spritefont.

I do not plan to change the game engine, but I'll appreciate any help of any kind.

Thanks for your time

here is my Game1 class (a small part of it)

public class Game1 : Game
{
  public static GraphicsDeviceManager graphics;
  public static SpriteBatch spriteBatch;
  public static ContentManager ContentManager;
  public static SceneManager SceneManager { get; private set; }
        
  public Game1()
  {
    ContentManager = Content;

    graphics = new GraphicsDeviceManager(this);
    ContentManager.RootDirectory = "Content";


    // TODO: Add your initialization logic here
    /*
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
    */
    Window.IsBorderless = true;
    graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
    graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
    IsMouseVisible = true;

  }

    (...) //The code continues
}

and here is the errors:

enter image description here

enter image description here

enter image description here

the Null pointer error on the Window variable occures when i declare a new Content manager


Edit:

It seem that there is a conflict between System.RunTime.Serialization v4 and v2 in my project

1>  Impossible de résoudre le conflit entre "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" et "System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes". Choix arbitraire de "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
found a lot of errors
Source Link

System Type 'Game' does not exists in 'Microsoft.NullReferenceException in every GameXNA.framwork.Game (...) variables XNA'

EDIT:

now i've got this, it poped really randomly but now i can see where the whole problem is comming, i'm renaming the question

enter image description here

also the Following Nuget packages appeared:

  • Microsoft.XNA.FrameWork
  • Microsoft.XNA.FrameWork.Content.Pipeline
  • Microsoft.XNA.FrameWork.Game

i think they came from the Monogame.Extended.ContentPipeline package and this might cause the errors, if so i'll send it in answer


I've been experiencing a really Strange problem since recently, Every variablesof XNA Framework Game class seems not to be initialized before my extending Game1 () class. The Content manager and the Window that should not be null, but like after I've tried to add a dll pipeline (that makes my content pipeline crash by the way) everything started to go wrong like this problem. I've had this after trying to import a.fnt (did not work) and a localized Spritefont.

I do not plan to change the game engine, but I'll appreciate any help of any kind.

Thanks for your time

here is my Game1 class (a small part of it)

public class Game1 : Game
{
  public static GraphicsDeviceManager graphics;
  public static SpriteBatch spriteBatch;
  public static ContentManager ContentManager;
  public static SceneManager SceneManager { get; private set; }
        
  public Game1()
  {
    ContentManager = Content;

    graphics = new GraphicsDeviceManager(this);
    ContentManager.RootDirectory = "Content";


    // TODO: Add your initialization logic here
    /*
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
    */
    Window.IsBorderless = true;
    graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
    graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
    IsMouseVisible = true;

  }

    (...) //The code continues
}

and here is the errors:

enter image description here

enter image description here

enter image description here

the Null pointer error on the Window variable occures when i declare a new Content manager

System.NullReferenceException in every Game() variables XNA

I've been experiencing a really Strange problem since recently, Every variablesof XNA Framework Game class seems not to be initialized before my extending Game1 () class. The Content manager and the Window that should not be null, but like after I've tried to add a dll pipeline (that makes my content pipeline crash by the way) everything started to go wrong like this problem. I've had this after trying to import a.fnt (did not work) and a localized Spritefont.

I do not plan to change the game engine, but I'll appreciate any help of any kind.

Thanks for your time

here is my Game1 class (a small part of it)

public class Game1 : Game
{
  public static GraphicsDeviceManager graphics;
  public static SpriteBatch spriteBatch;
  public static ContentManager ContentManager;
  public static SceneManager SceneManager { get; private set; }
        
  public Game1()
  {
    ContentManager = Content;

    graphics = new GraphicsDeviceManager(this);
    ContentManager.RootDirectory = "Content";


    // TODO: Add your initialization logic here
    /*
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
    */
    Window.IsBorderless = true;
    graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
    graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
    IsMouseVisible = true;

  }

    (...) //The code continues
}

and here is the errors:

enter image description here

enter image description here

enter image description here

the Null pointer error on the Window variable occures when i declare a new Content manager

Type 'Game' does not exists in 'Microsoft.XNA.framwork.Game (...)'

EDIT:

now i've got this, it poped really randomly but now i can see where the whole problem is comming, i'm renaming the question

enter image description here

also the Following Nuget packages appeared:

  • Microsoft.XNA.FrameWork
  • Microsoft.XNA.FrameWork.Content.Pipeline
  • Microsoft.XNA.FrameWork.Game

i think they came from the Monogame.Extended.ContentPipeline package and this might cause the errors, if so i'll send it in answer


I've been experiencing a really Strange problem since recently, Every variablesof XNA Framework Game class seems not to be initialized before my extending Game1 () class. The Content manager and the Window that should not be null, but like after I've tried to add a dll pipeline (that makes my content pipeline crash by the way) everything started to go wrong like this problem. I've had this after trying to import a.fnt (did not work) and a localized Spritefont.

I do not plan to change the game engine, but I'll appreciate any help of any kind.

Thanks for your time

here is my Game1 class (a small part of it)

public class Game1 : Game
{
  public static GraphicsDeviceManager graphics;
  public static SpriteBatch spriteBatch;
  public static ContentManager ContentManager;
  public static SceneManager SceneManager { get; private set; }
        
  public Game1()
  {
    ContentManager = Content;

    graphics = new GraphicsDeviceManager(this);
    ContentManager.RootDirectory = "Content";


    // TODO: Add your initialization logic here
    /*
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height
    GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width
    */
    Window.IsBorderless = true;
    graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
    graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
    IsMouseVisible = true;

  }

    (...) //The code continues
}

and here is the errors:

enter image description here

enter image description here

enter image description here

the Null pointer error on the Window variable occures when i declare a new Content manager

deleted 2 characters in body; edited title
Source Link
Loading
added 2 characters in body
Source Link
Loading
Source Link
Loading