Code Red > .NET

Compiling code for C3D-2007 after C3D-2008 is installed

(1/2) > >>

sinc:
I'm having an issue I haven't been able to resolve.

Since installing Civil-3D 2008, all DLLs I create for C3D-2007 will only work if C3D-2008 is also installed on the same system.  It seems to have something to do with the Interop libraries, but I'm not entirely sure what is going on.  I made no changes to the references in my 2007 project - all I did was install C3D 2008, and now I can't create DLLs for people who have only 2007.  2008 must also be installed, or the DLLs crash at runtime.

This might be a simple issue for someone who is familiar with .NET assemblies and how Microsoft has them working.  I'm still pretty new to this whole .NET world, so I'm not entirely sure how to resolve the issue.  It could even be an issue created by Autodesk, which only they can resolve.  I'm not entirely sure.  And I'm hampered by the fact that I do not have easy access to a 2007-only test machine.  If anyone thinks they can figure this out, I'd appreciate the help.  The complete source code project is available at:

http://www.ejsurveying.com/sincpacc3d.htm

sinc:
Alternatively, if someone who has only Civil-3D 2007 installed can download and compile the source, then get the DLL back to me, I'd appreciate that, too.  Then I could at least post a working DLL on our website.

Glenn R:
It sounds you're referencing the Interop libraries from 8 explicitly and whne it's tried to run on 7 it chokes.
I haven't found a neat way to get around the interop library thing as of yet, so you should keep 2 versions and reference the appropriate libraries for each.

Jeff_M:
Hi Glenn.
How would you go about doing that? Both 2007 & 2008 install "acax17enu.tlb" in the Autodesk Shared folder, so once 2008 is on the machine the only one available to reference is the 2008 version.

TonyT:
The AutoCAD ActiveX assemblies are in the GAC, so the
libraries from the newest release will be used by default.

That means that once someone with a working copy
of your app targeting '07 installs '08, the '07 version
may no longer work on '07.

You may have heard how installing a trial version of a
newer release of AutoCAD often corrupts installed
applications that work in an installed earlier release.

The only way to address that, is to copy your entire
Common Files\Autodesk Shared folder before you install
a newer release, to a different name. Then, when you
run the earlier release, rename the two copies of the
that folder so the one that was installed by the release
you're going to run is named 'Autodesk Shared'.

Autodesk shouldn't have given this folder the name
'Autodesk Shared'.

'Autodesk Sabatoge' would be more appropriate.


--- Quote from: Jeff_M on May 06, 2007, 11:15:37 PM ---Hi Glenn.
How would you go about doing that? Both 2007 & 2008 install "acax17enu.tlb" in the Autodesk Shared folder, so once 2008 is on the machine the only one available to reference is the 2008 version.

--- End quote ---

Navigation

[0] Message Index

[#] Next page

Go to full version