Author Topic: Compatability of .NET dlls and AutoCAD versions  (Read 12896 times)

0 Members and 1 Guest are viewing this topic.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Compatability of .NET dlls and AutoCAD versions
« on: March 26, 2008, 12:21:51 PM »
If I build a .NET dll that is loaded into AutoCAD, is it compatable with all versions of AutoCAD .. or can it be compatable if it isn't automatically. The reason is I have a few other DLLs that are written in other languages .. VB6 and C++ .. these programs are written version independent. I don't want to port them over to .NET if I don't have to .. preferring instead to build a .NET loader so they can be "in process" ... but if I have to build 4 or 5 different .NET versions, I'll simply have to load the program in process using a few tricks and then force AutoCAD to manage the code.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #1 on: March 26, 2008, 12:58:16 PM »
I just went over this with a few people, I had the same question.
The answer was that your .net dll will be good for the typical sets of three acad versions (2007,8,9), unless you have dependencies that are version specific.
Things like the vertical apps sometimes have version specific dlls, like Land Desktop or Civil 3D.
I think the thing to watch for is the "version specific" property in the references properties.
James Maeding

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #2 on: March 26, 2008, 02:12:15 PM »
All I need to do is load an external program into the AutoCAD process. If this requires developing a .NET dll for each version of the program where the SDK changed, then this solution is no solution.

I suppose I will have to utilize rtlMoveMem, CreateRemoteThread and assembly modules to inject my DLL into the AutoCAD memory space to prevent marshalling .. and having to recreate the dang thing every couple of versions of AutoCAD ...

Oh well .. you would think that for those of us who want to manipulate the AutoCAD object at the core, would be able to utilize a more in depth application interface.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #3 on: March 26, 2008, 02:22:31 PM »
I'm not sure I understand the question, but I have one dll that I can use in both '08 and '06.  I am able to load, and run commands defined when I only had '06 installed in '08, and I can run dll's compiled against '08's dlls in '06.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #4 on: March 26, 2008, 02:35:12 PM »
Ok .. let me give a little bit if background ..

I have an ActiveX application that interacts with AutoCAD dynamically, by loading the required AutoCAD objects at runtime. Using this method is a bit more difficult in the design stage, but you don't have the overhead of dealing with specific version changes and you don't have to rebuild the program when Autodesk changes something in the program, as the program loads a reference to the AutoCAD objects it needs, but only when it needs them. Right now this works great except it is built as an executable and as such there is marshalling. My goal is twofold ...

1) eliminate marshalling by loading my application as an activex dll in-process with AutoCAD
2) take advantage of the existing manifest settings in AutoCAD rather than build my own

I don't want to rebuild every few versions because:
a) My clients are paying a premium for the program. This is not a cheap piece of software.
b) I don't want hundreds of mad clients when they upgrade AutoCAD and their program does not work.
c) I don't want to give away free upgrades to clients using prior versions.

There are many other reasons too.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Glenn R

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #5 on: March 26, 2008, 02:42:21 PM »
I have .NET dll's that work in 2006 - 2008 and would probably work in 2009 as well.

What actually happens, is that acad spins up an 'AppDomain' to load all .NET runtime extensions into. If you set you're 'Copy Local' setting to false, once you're dll is loaded
into the acad AppDomain (either through NETLOAD or demand loading) it will then probe for the dll's it references ie. *mgd*.dll.

These acad specific dll's are already loaded by the acad AppDomain that has already been spun up, therefor, your dll's can find the references as acad takes care of it.

sinc

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #6 on: March 26, 2008, 04:19:42 PM »
Note that you can't do any of this if you load the interops, and are working with ActiveX objects in .NET (as you must if you are programming a vertical app like C3D).

With that, there are still ways to create version-independent DLLs, but they involve something called "late binding", which makes your development much harder and slower.

Basically, late binding amounts to replacing lines like this:

Code: [Select]
double rot = entity.Rotation;
with lines like this:

Code: [Select]
double rot = (double)entity.GetType().GetProperty("Rotation").GetValue(entity, null);

Glenn R

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #7 on: March 26, 2008, 04:24:58 PM »
Agreed. Once COM is involved, you are bound by type library and Interface versioning issues.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #8 on: March 26, 2008, 04:56:38 PM »
Late binding isn't an issue, I already do everything through late binding ... makes the code version independent. I am deploying to users from R2000 through R2009 ... and yes I know there is no .NET prior to R2004 ...

Anyway, I have about 15 COM exposed classes that already do everything I need done. I am just looking to determine if it would be in my best interest to build a .NET loader for the newer versions of AutoCAD. We will likely be dropping support for AutoCAD prior to R2004 with the next upgrade cycle.

I decided long ago to forgo the ARX development debacle. If I can't move a dll from version to version without having to recompile, I don't want to use it. What happens when users upgrade AutoCAD in the middle of our upgrade cycle? Our users are screwed until we can rebuild the program using the newest SDK.

Nope .. not gonna do it.

and if I can't get .NET to do it, I'll make my own and force AutoCAD to eat it.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #9 on: March 26, 2008, 08:02:11 PM »
what do you mean by a .net loader?
That is normal practice to wait for third party developers to create a new prog for each 3 versions of acad.
I'd never complain if a vendor took a month after release to kick out a new compile.
James Maeding

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #10 on: March 26, 2008, 11:52:36 PM »
what do you mean by a .net loader?
An assembly that would load my program into the AutoCAD memory space. Perhaps you have a different name for it. Essentially it is no different than the autoload functions of lisp. All they do is load the other program into memory.

That is normal practice to wait for third party developers to create a new prog for each 3 versions of acad.
It is also one of the reasons why my decision to purchase 3rd party software is based largely upon whether I will be required to upgrade when I upgrade my software. My package works on all windows 32 and 64 bit OSs without issue and works on all versions of AutoCAD from R2000 to R2009 with a single build.

I'd never complain if a vendor took a month after release to kick out a new compile.
You would likely change your tune if the software you were waiting on was mission critical and you paid in excess of $15k for it. You would likely expect that it would work regardless and if it didn't, you would be probably be screaming at the vendor within a few hours.

We are not talking about a device driver or a widget that makes life easier. We are talking about something that takes a hundred manhours and turns them into 5 minutes.

Like I said before, if I cannot expect the .NET assembly to work on all versions of AutoCAD currently released (R2004 - R2009), then I will have no choice but to make AutoCAD to load my interface by brute force.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

sinc

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #11 on: March 27, 2008, 01:11:47 AM »
You've kind of lost me.

I think you started out asking about porting C++ and VB6 code to .NET...?  But you are also saying something about a ".NET loader" that, um... loads something into memory?  ...maybe the C++/VB6 stuff?

I'm not really sure what you're asking, or what you are trying to accomplish.  If you are simply trying to load existing C++ and VB6 stuff into memory, I'm not sure why or how you're trying to use .NET.  If you need to provide .NET programmatic access to C++ stuff, then that would be done by creating a managed DLL for your stuff.  If you are merely trying to convert existing working code to .NET, then why are you doing that, since it sounds like you really don't want to?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #12 on: March 27, 2008, 01:16:43 AM »
< .. >  and you paid in excess of $15k for it. < .. >

We are not talking about a device driver or a widget that makes life easier. We are talking about something that takes a hundred manhours and turns them into 5 minutes.


so he uses it twice and it pays for itself ?
.. thats a pretty reasonable ROI. Seems to me the client could afford to update AutoCAD by the third usage.



kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8703
  • AKA Daniel
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #13 on: March 27, 2008, 01:23:44 AM »
Question: to ADN members get an SDK to play with while testing for the release candidates?

Keith, Do you beta test your mission critical applications on new releases of AutoCAD before shipping? Just to make sure something is not broken?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #14 on: March 27, 2008, 04:12:06 AM »
Question: to do ADN members get an SDK to play with while testing for the release candidates?

< .. >

yes.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #15 on: March 27, 2008, 09:18:32 AM »
Ok, we are going round and round and evidently I am not capable of making myself clear.

This application is not written as a .NET assembly, it is written in a combination of VB and C++.
I could rewite the tens of thousands of lines of code in .NET, but considering the unsecure nature of .NET dlls and the relative cost of the software, I fear end users would decompile it and years of work would be lost, not to mention the issue of having to upgrade the software at the whim of Autodesk.

Now, since this is a self contained program that runs entirely on its own, it runs in its own memory space. This creates an issue with marshalling. If you understand what marshalling is, then you understand the severity of the problem, particularly considering the fact that the program grows every year to include more functionality.

Users have expressed an intrest in getting the interface to look more like their other windows. This would mean that I need to include a manifest for the program, however, given the nature of the program, the close ties it has to AutoCAD and the amount of interaction required between the two, its style should look similar to AutoCAD's. The most efficient method would be to use the AutoCAD manifest to set the style of our software. The problem is that Autodesk does not expose the manifest, however, I can still use the AutoCAD manifest by loading this software in the AutoCAD memory space. So, in the end I resolve 2 problems.

1) marshalling is eliminated
2) manifest is applied

The question is really simple, at least I think it is simple. You don't need to think about the what, where or why, only can.

That being said, can a .NET assembly written for R2004 work in all versions of R2004 - R2009 provided that the .NET assembly does not use any AutoCAD interop libraries.

This .NET assembly would merely load my software, which can be ran as a stand alone program, into the AutoCAD process. Really I don't know how much simpler I can say it, or what else I can say to make it more clear.


Now to answer a few of the questions raised
I think you started out asking about porting C++ and VB6 code to .NET...? 
No I didn't, it has always been about using .NET to load another program into AutoCAD memory space


But you are also saying something about a ".NET loader" that, um... loads something into memory?  ...maybe the C++/VB6 stuff?

Exactly, but the .NET assembly must be able to run on ANY version of AutoCAD from R2004 - R2009 (current versions)


I'm not really sure what you're asking, or what you are trying to accomplish.  If you are simply trying to load existing C++ and VB6 stuff into memory, I'm not sure why or how you're trying to use .NET.
Why: Marshalling elimination and manifest inclusion.
How: Reference my DLL in the .NET assembly and call it from there.


  If you need to provide .NET programmatic access to C++ stuff, then that would be done by creating a managed DLL for your stuff. 
I don't need .NET except to load my software into AutoCAD memory space.

If you are merely trying to convert existing working code to .NET, then why are you doing that, since it sounds like you really don't want to?
No, I do not want to, .NET is notoriously insecure. It can be decompiled in merely seconds or can be edited in place without ever decompiling.

so he uses it twice and it pays for itself ?
.. thats a pretty reasonable ROI. Seems to me the client could afford to update AutoCAD by the third usage.
Without spending lots of time explaining the workflow process of the users, it would be hard to imagine. Consider this as a comparison to calculating the trajectory of a spaceship to Pluto using an abacus. Regardless, some clients have a complete ROI after 1 use, with some users it takes as many as 10 uses.

With the new release, due in the next month or so, the pricing is also increasing by about 20%-25%.

But then you can't really put a price tag on the savings you would realize if the program prevented you from making a serious mistake in your data processing. Imagine if you had a single misplaced decimal on your structural calculations for a bridge, and that bridge ultimately failed because of it ... unfathomable ... of course these things would be checked over and over again, but what if ...

Keith, Do you beta test your mission critical applications on new releases of AutoCAD before shipping? Just to make sure something is not broken?
We go through months of in house testing, trying to imagine all the ways a user would abuse the software. After we do that, we put it in a real world environment for a month or so, just to let the guys who will use it see if they can break it. Only then does it get released for general usage ... and when something is found to be broken and it is brought to our attention, we try to issue an update within 24 hours, although it has taken as long as 72 hours.

Of course we can't test for potential issues with AutoCAD 2010 ... or any other future release not yet conceived, so as such, when a company chooses to not upgrade, we want the user to be able to continue to use our software even when they do upgrade AutoCAD, without forcing an upgrade to our software. It sounds counter productive, but we have users still on the second release and we are already working on the 6th release.

To date we have had only 1 serious bug and it was resolved within hours and all users were patched. Even then, this did not affect 75% of the users. There have been maybe 4 or 5 incidental bugs since that didn't affect the end product. Not that there are not any, we just havn't found a way to break it ... yet ... but we are wtill trying.

Really , I am not trying to be difficult, I am merely wanting to speed things up for the users, and do so without burdoning the already tight production schedule.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Draftek

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #16 on: March 27, 2008, 09:45:04 AM »
Quote
The question is really simple, at least I think it is simple. You don't need to think about the what, where or why, only can.

That being said, can a .NET assembly written for R2004 work in all versions of R2004 - R2009 provided that the .NET assembly does not use any AutoCAD interop libraries.

Nope!

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #17 on: March 27, 2008, 09:49:16 AM »
Then the choice is made ... doing a .NET assembly is not an option.

I suppose I'll have to feed my software to AutoCAD using brute force.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8703
  • AKA Daniel
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #18 on: March 27, 2008, 10:04:45 AM »
2004 doesn’t have .NET, But I bet you can use one DLL for 2005-2009 if you don’t reference the managed extensions and strictly use p/invoke

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #19 on: March 27, 2008, 10:16:24 AM »
2004 doesn’t have .NET, But I bet you can use one DLL for 2005-2009 if you don’t reference the managed extensions and strictly use p/invoke

That is pretty much what I was looking for
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

sinc

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #20 on: March 27, 2008, 10:41:04 AM »
Yeah, I'm not sure why you couldn't get a DLL to work in versions 2005+.  You may need to target the .NET 1.1 Framework.  Or maybe not - I haven't tried doing anything with pre-2007 .NET in Autocad.

But it sounds strange.  I had gotten the impression that all the manifest did was tell your legacy app to use the V6 controls if they are available, which enables your legacy app to use the current visual style set in XP or Vista.  The style itself is in the OS - all you need to do is specify that your app should use the version 6 controls.  As such, I wouldn't expect you to need to get a manifest from Autocad.  At least, that was my understanding, which may be completely wrong.

And I don't really understand what marshalling issue you are trying to solve.  Is the problem that you are instantiating one instance of your custom app for every drawing your users open, and you are trying to get it to instantiate only a single instance of your app?  Or is it something else?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #21 on: March 27, 2008, 11:24:26 AM »
Yeah, I'm not sure why you couldn't get a DLL to work in versions 2005+.  You may need to target the .NET 1.1 Framework.  Or maybe not - I haven't tried doing anything with pre-2007 .NET in Autocad.

Ok .. I can reference the .NET 1.1 framework if needed, that isn't an issue ...

But it sounds strange.  I had gotten the impression that all the manifest did was tell your legacy app to use the V6 controls if they are available, which enables your legacy app to use the current visual style set in XP or Vista.  The style itself is in the OS - all you need to do is specify that your app should use the version 6 controls.  As such, I wouldn't expect you to need to get a manifest from Autocad.  At least, that was my understanding, which may be completely wrong.

All the manifest does is cause your application to use the visual styles set in XP or Vista, however, each application has its own manifest implementation. The manifest can be modified as well to enhance the visual style. So far as the manifest is concerned, I am looking to force this application to look like it is a native AutoCAD command, a first step is to utilize the AutoCAD manifest tucked nicely away in one of the AutoCAD DLLs. It is irrelevant if the program is written in VB, C++, or a .NET language.

And I don't really understand what marshalling issue you are trying to solve.  Is the problem that you are instantiating one instance of your custom app for every drawing your users open, and you are trying to get it to instantiate only a single instance of your app?  Or is it something else?

Marshalling happens whenever any application interacts with another application while they are running in seperate processes. Thus, if I run my application as an executable, it by the sheer nature of computing, must marshall data between the processes. If that data segment is large, performance takes a considerable hit.

I don't have to worry about instantiating multiple applications, If the user attempts to open the program twice, the second instance fails and merely brings the first instance into focus.

In VB the call would be something along the lines of

Code: [Select]
If App.PrevInstance Then
     ActivatePrevInstance 'defined elsewhere
   Else
     ThisApplicationWindow.Show
  End If
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8703
  • AKA Daniel
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #22 on: March 27, 2008, 11:40:31 AM »
Yeah, I'm not sure why you couldn't get a DLL to work in versions 2005+.  You may need to target the .NET 1.1 Framework.  Or maybe not - I haven't tried doing anything with pre-2007 .NET in Autocad.

Ok .. I can reference the .NET 1.1 framework if needed, that isn't an issue ...

You can use .NET 2.0 on 05, 06, works just fine  :-)

Nathan Taylor

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #23 on: March 27, 2008, 05:51:14 PM »
Yeah, I'm not sure why you couldn't get a DLL to work in versions 2005+.  You may need to target the .NET 1.1 Framework.  Or maybe not - I haven't tried doing anything with pre-2007 .NET in Autocad.

Ok .. I can reference the .NET 1.1 framework if needed, that isn't an issue ...

You can use .NET 2.0 on 05, 06, works just fine  :-)

I had issues using .NET 1.1 with later versions of AutoCAD Map.

sinc

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #24 on: March 27, 2008, 06:00:29 PM »
Hmmm...  and when I converted my .NET stuff to 2009, it also complained because it was in 2.0...  I upped the target framework to 3.5, and it was happy.  I didn't try to force the issue, though - I just switched to the 3.5 and didn't think about it anymore.  If I tried to stay with 2.0, I don't know if I would have serious problems or not in 2009.  I wouldn't expect to, but the compiler was complaining...

Nathan Taylor

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #25 on: March 27, 2008, 06:04:57 PM »
Hmmm...  and when I converted my .NET stuff to 2009, it also complained because it was in 2.0...  I upped the target framework to 3.5, and it was happy.  I didn't try to force the issue, though - I just switched to the 3.5 and didn't think about it anymore.  If I tried to stay with 2.0, I don't know if I would have serious problems or not in 2009.  I wouldn't expect to, but the compiler was complaining...

Do you know if 3.5 can be used with VS2005 or is VS2008 necessary.

Glenn R

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #26 on: March 27, 2008, 06:46:41 PM »
Do you know if 3.5 can be used with VS2005 or is VS2008 necessary.

Visual Studio 2005 knows nothing about the .NET 3.0 and 3.5 frameworks. It knows *some* of the .NET 3.0 WPF, WCF, WF stuff it you install the correct addons, but essentially, WRT 3.5, VS2008 is da stuff.

Keith,

Acad 2005 was the first .NET "aware" acad (and even this was a first implementation, which they significantly changed in 2006), therefor, 2006 - 2009 should load your stuff ok, depending on my previous post. As far as I'm aware (and Dan already alluded to), any version prior to 2005 wouldn't even know what a .NET .dll is, let alone know what to do with it.

Hope this helps some.

Cheers,

StefanDidak

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #27 on: April 05, 2008, 08:39:41 AM »
Hmmm...  and when I converted my .NET stuff to 2009, it also complained because it was in 2.0...  I upped the target framework to 3.5, and it was happy.  I didn't try to force the issue, though - I just switched to the 3.5 and didn't think about it anymore.  If I tried to stay with 2.0, I don't know if I would have serious problems or not in 2009.  I wouldn't expect to, but the compiler was complaining...

There would not have been any problems. That error (the warning from one of the *mgd.dll's right?) doesn't seem to have any relevance. I'm currently maintaining 4 (VS2008) versions of the same C3D project which are done in NET 2.0 and NET 3.5 for both C3D 2008 and 2009. So far extensive testing has not shown any problems with any of the combinations. You can check out the VS2008/NET20/C3D2008 result by downloading the C3D GENIO Importer from the Autodesk site. :-)



sinc

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #28 on: April 05, 2008, 10:33:59 AM »
OK, that's what I would've guessed, I just haven't had a chance to explore it yet.

Stefan, do you also get a lot of warnings whenever you compile something for C3D?  If I include a reference to any of the C3D interops, I get a lot of warnings about types that claim they are defined in Autodesk.AutoCAD.Interop.dll, but could not be found.  The messages seem to be innocuous, but they are annoying, and they make it difficult to see the REAL warnings.  A successful compile of one of my projects (with two subprojects) results in 228 of these things.

Is there some way to get rid of those warnings?  Or is it in something Autodesk did, and it's just something we have to live with?

StefanDidak

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #29 on: April 05, 2008, 10:42:01 AM »
Is there some way to get rid of those warnings?  Or is it in something Autodesk did, and it's just something we have to live with?

I assume you're talking about a whole bunch of warnings of the type 1684? Those warnings are a (nasty) side effect of the way the whole API has been constructed and there's no way to get rid of them other than to suppress the warning in the *.csproj file(s) and stick with warning level 4. They'll still be there but at least they won't clutter up the output. I noticed that one of the minimalistic C3D managed code samples also had the warning suppressed so it just seems the way "things are".

sinc

  • Guest
Re: Compatability of .NET dlls and AutoCAD versions
« Reply #30 on: April 05, 2008, 05:28:17 PM »
Great, thanks!  I added 1684 to the list of errors to suppress, and now those warnings are gone!

That's been bugging me for over a year now.