Ad

Monday, July 13, 2009

AutoCAD .NET Labs Error

I’m not quite sure what’s causing the problem, but if you download the code for the AutoCAD .NET Labs you may get some errors.

image

Error    1    Reference required to assembly 'WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' containing the type 'System.Windows.DependencyObject'. Add one to your project.

Error    2    Reference required to assembly 'PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' containing the implemented interface 'System.Windows.Interop.IWin32Window'. Add one to your project.   

Error    3    Reference required to assembly 'PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' containing the implemented interface 'System.Windows.Interop.IWin32Window'. Add one to your project.   

The problem is that some references are missing or can’t be used because the wrong Microsoft Framework is referenced, at least for my OS and setup. To fix it go to the Project Properties, Compile Tab and choose the Advanced Compile Options.. button.

image

Then change the Target Framework to .NET Framework 3.0 or 3.5. The error messages will then be removed.

The Lab 7 covers how to recognize HandleEvents in Autocad so you can observe what’s happening in Autocad and then do something when something changes. If you want a better explanation download the Lab from the link above and it should have a document that covers what the Lab shows.

No comments:

LinkWithin

Blog Widget by LinkWithin

Ad