Here's what I got; that's not good.
Failed to create component 'UserControl1'. The error message follows:
'System.IO.FileNotFoundException: Could not load file or assembly 'acmgd,
Version=17.0.54.0, Culture=neutral,
PublicKeyToken=null' or one of its dependencies. The system cannot find the
file specified.
File name: 'acmgd, Version=17.0.54.0, Culture=neutral, PublicKeyToken=null'
at CsMgdAcad2.UserControl1.UserControl1_Load(Object sender, EventArgs e)
at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
at System.Windows.Forms.UserControl.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.ControlCollection.Add(Control value)
at System.Windows.Forms.Form.ControlCollection.Add(Control value)
at
System.Windows.Forms.Design.ParentControlDesigner.AddChildControl(Control
newChild)
at System.Windows.Forms.Design.ParentControlDesigner.AddControl(Control
newChild, IDictionary defaultValues)
at
System.Windows.Forms.Design.ControlDesigner.InitializeNewComponent(I...'
"Tony Tanzillo" wrote in message
news:5246882@discussion.autodesk.com...
I've identified a fairly nasty issue in managed
extensions for AutoCAD 2007. I'd be interested
in hearing from Autodesk about it, or anyone
who cares to try this.
1. Open VS2005 and create a new solution
with a C# ClassLibrary project (optionally,
you can use the Autodesk-provided C#
project wizard). Delete the Class1 class
from the project.
2. In the ClassLibrary project, add a reference
to acmgd.dll (for debugging you need to
set CopyLocal to false, but for this it does
not matter what it's set to).
3. Add a new Form the project, using the
default name 'Form1'.
4. Add a new UserControl to the project
using the default name 'UserControl1'.
5. Open UserControl1.cs, and add the
following using directive:
using Autodesk.AutoCAD.ApplicationServices;
6. Build the solution.
7. Open UserControl1 in the designer. On the
Events tab of the properties pane, add a
handler for the UserControl's Load event,
using the default name 'UserControl1_Load'.
8. In the body of UserControl1_Load(), add the
following code (the Document type is from
Autodesk.AutoCAD.ApplicationServices).
if( false )
{
Document doc = null;
}
Note that the above code is unreachable and
you will get a warning as a result, which you
should ignore. This is done deliberately to
ensure the code never executes in the IDE.
9. Rebuild the solution, and ignore the warnings
about unreachable code, or that the doc variable
is assigned but never used.
10. Open Form1 in the designer, and from the Toolbox,
insert an instance of UserControl1 onto Form1.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com