2

I recently updated my machine from Windows 8 to Windows 10. Since then, I get a NullReferenceException in SharpDX.Toolkit.Game.dll when I call

this.game.Run(context)

Where game inherits from SharpDX.Toolkit.Game and context is a SharpDX.Toolkit.GameContext with a ContextType of DesktopWpf.

On the SharpDX Homepage I could not find any information about migrating projects to Windows 10.

Before upgrading, everything worked fine. Do I need to tweak any special setting? Or do I need to upgrade to SharpDX 3.0.0, which is still alpha?

Edit: The exception is not raised in my code, but in the code of SharpDX - just to make it clear.

Michael Hilus
  • 1,316
  • 1
  • 17
  • 37
  • possible duplicate of [What is a NullReferenceException and how do I fix it?](http://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it) – Nasreddine Aug 10 '15 at 13:01
  • 1
    No, the exception does not occur in my code, but in the code of SharpDX. All passed parameters are checked to be not null. I know what a `NullReferenceException` is ;-) – Michael Hilus Aug 10 '15 at 13:05
  • 1
    Does the error only occur if you build the application on Win10 or does it also happen if you take existing binaries to 10 (if you are able to try that)? – PMF Aug 10 '15 at 13:21
  • @PMF I unfortunately do not have any non-Win10 binaries which I can use for testing this. – Michael Hilus Aug 10 '15 at 13:24
  • Just guessing: Could be a problem with the display driver as well. I've had similar observations in the past that caused crashes in DirectX after I had upgraded my video driver. – PMF Aug 10 '15 at 13:51
  • @MichaelHilus: How did you manage to add a Nuget dependency for SharpDX version < 3.0.0 to a Windows 10 project?. Have you manually added the dependencies and they just work with Win10 binaries and Win10 SDK? – Ma3x Sep 01 '15 at 15:49
  • @Ma3x: I did not touch my WPF project for porting to Windows 10, so I already had defined the Nuget packages. The old version of SharpDX works with the Windows 10 SDK. – Michael Hilus Sep 01 '15 at 21:17

1 Answers1

2

I just found the solution: After upgrading Windows from 8.1 to 10, you need to upgrade your Windows SDK as well by installing the Windows 10 SDK.

The Windows 10 SDK can be downloaded here.

Michael Hilus
  • 1,316
  • 1
  • 17
  • 37