开发者

Weird compile error in Visual C#

I'm starting to think that Visual Studio is genuinly messing with me. My solution won't compile because of this one error:

The type "OpenTK.GameWindow" is defined in a unreferenced assembly. Add a reference to the assembly "OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4".

The problem is, I'm not even trying to use the OpenTK.GameWindow type. Fur开发者_如何学Cthermore, the 'error' occurs on a completely unrelated line of code:

Velocity.Y -= PhysicsSettings.Gravity * (float)VenCore.FrameTime;

If I comment out that line, the error moves to another line... ???

I've restarted my computer and VS multiple times. I've tried deleting all of the .suo's to no avail....


If a type you are using is it self using OpenTK.GameWindow and you haven't included that DLL you'll get an error message like the one you mention. If you comment out the line where you use the type that uses OpenTK.GameWindow you will get it at the next line the compiler sees that has the same problem


Try to completely rebuild your solution. It sometimes makes weird errors go away :-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜