CXO2's picture

Everything throw "NotImplemented" Exception


I am trying to create OpenTK GameWindow with VisualStudio
I added OpenTK source directly to my project instead linking to the OpenTK.dll

Everything i call method from GL class is throwing an exception ("NotImplemented")

So I just checked the source by pressing F12 (in Visual Studio 2012)
and what I see is everything are throw new NotImplemented Exception

I am using OpenTK 1.1 beta 3
Sorry for my bad English


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

OpenTK 1.1 beta3+ uses an interop method that cannot be expressed in pure C#, so you need to run a code rewriter (Binaries/Tools/Release/Rewrite.exe) on the compiled assembly. OpenTK does this as a post-build event.

Please keep that what you are trying to do is not officially supported.

My suggestion would be to keep OpenTK.dll separate and use ILMerge or ILRepack to merge it into your binary. You can also use Dependencies/managed/monolinker.exe to reduce the size of OpenTK.dll down to 500-600KB first.

Edit: a different alternative would be to embed OpenTK.dll as a resource and use the AppDomain.AssemblyLoad event to load it. The following project tries to automate this process:

CXO2's picture

I see, I will try to use ILMerge then
Thank you!