problem using SharpGL.dll and sharpGL.WinForm.dll

Feb 24, 2012 at 5:31 PM

Hello I would really appreciate if can give me a hand here. 

I am doing some experiments with SharpGL and I am trying to generate a 3D triangle using Windows Form Application. I am more likely a noob using both Visual Studio and SharpGL so if there is any basic mistake I do apologize.

The fact is that by the time I add both references sharpGL.dll and sharpGL.WinForm.dll everything seems to be ok. However when I try to build the program I get always the same 2 warnings:

“The referenced assembly "SharpGL" could not be resolved because it has a dependency on "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. OglTutorial”

“The referenced assembly "SharpGL.WinForms" could not be resolved because it has a dependency on "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. OglTutorial”

I have already add sharpGL library in my code (“using SharpGL;”)

I hope you can help me. Thank you very much.

Coordinator
Feb 24, 2012 at 6:18 PM

Hi try right clicking on your project, choosing properties and changing the framework version from .net 4 client profile to .net 4- that should sort it!

 

Feb 24, 2012 at 6:48 PM

Thank you very much! I have tried it and it is working!

Apr 24, 2012 at 4:51 PM

Hi,I have the same problem in using SharpGL.SceneGraph.dll

could you tell me how to change the framework version from .net 4 client profile to .net 4?

Apr 27, 2012 at 5:50 AM

Hi, When you build your project, lke "add new project", you will find  ".Net Framework 4" etc.

Sep 27, 2012 at 11:15 AM

I can't use the  OpenGLControl , it throws an exception right in the designer and writes out "Object reference not set to an instance of an object. Stack trace: at SharpGL.OpenGLControl.OnPaint(PaintEventArgs e)". I tried all this with the SharpGL 2.0 Beta 1.

what can I do?

Coordinator
Sep 27, 2012 at 2:11 PM

Have you tried using the full SharpGL 2.0 rather than the beta? If you are still having problems, zip and attach the solution and I can take a look and see if it is something in the settings, otherwise we may have an issue to do with your setup - in which case the following would be useful:

OS Version
Processor Architecture (x86 or x64)
Version of Visual Studio (including SPs) 

Sep 27, 2012 at 2:24 PM

Thank you but where can I find it

Sep 27, 2012 at 2:46 PM

never mind I found it and I think it working

Thank you again