.NET Assemblies Legal Issues.

Discussion in 'AutoCAD' started by Tim Riley, Mar 30, 2005.

  1. Tim Riley

    Tim Riley Guest

    When I compile a type library in Visual C# it copies all of the assemblies I
    reference into the /bin/release/ folder. I am assuming it does this so I can
    zip this whole directory, distribute it and the user will have all the files
    required to run my program within that directory.

    Now my question is am I legally allowed to distribute these files? Say I'm
    working on a community project, can I post a zip including the binary files
    acdbmgd.dll and acmgd.dll on a website? Otherwise I am going to have to
    develop some sort of install script that either builds the project from
    source.

    TIA,
    Tim Riley
     
    Tim Riley, Mar 30, 2005
    #1
  2. For the references, set the Local Copy property to false then they won't be
    copied local.

    -- Mike
    ___________________________
    Mike Tuersley
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Mar 30, 2005
    #2
  3. Tim Riley

    Tim Riley Guest

    Mike:
    Thanks for the info. But how then do the end users use my dll? When I
    referenced acdbmgd.dll and acmgd.dll I had to manually select them at the
    path "c:\program files\autodesk\acadm 2005\". Does this mean that if I
    release my dll and the end user is using AutoCAD 2005 but not AutoCAD
    Mechanical 2005 that the program will not work because the paths don't
    match?

    Tim Riley
     
    Tim Riley, Mar 30, 2005
    #3
  4. path "c:\program files\autodesk\acadm 2005\". Does this mean that if I
    Tim,

    I was just reading about this in a C# standards manual for Classes. The
    author was adamant about not hard coding any paths in your classes. For
    just this reason. I would obtain the version and location from the local
    computer. Otherwise Try Catch? I'm not the expert here.

    gl
    Paul
     
    Paul Richardson, Mar 30, 2005
    #4
  5. I don't see why not. .NET makes it very easy to install assemblies which
    are to be referenced from the GAC. Autodesk didn't go that route so
    either it's an oversight or a design choice.
     
    Frank Oquendo, Mar 30, 2005
    #5
  6. Tim Riley

    Tim Riley Guest

    Paul:

    I'm not hardcoding any paths. The References required to access AutoCAD from
    ..NET are not available in the normal .NET GAC I have to click the browse tab
    and add them manually. It is beyond me how I could find these .NET
    assemblies automatically.

    Tim Riley
     
    Tim Riley, Mar 30, 2005
    #6
  7. Tim Riley

    Tim Riley Guest

    Very true. I'm still a little nervous as the last thing I need is Autodesk
    coming after me because I made their proprietary files available to pre-2005
    people.

    Tim Riley
     
    Tim Riley, Mar 30, 2005
    #7
  8. Tim Riley

    Norman Yuan Guest

    When you set reference in .NET app to COM base app (Acad), a .NET interop
    wrpper .DLL file is created (or you use PIA provided by the COM App
    manufacturer). I think you are free to send these Interop .Dll assemblies to
    your user. However, in the case of AutoCAD, I doubt you can legally send the
    COM dll that wrpped by the Interop. dll. On the other hand, if your users
    have the same AutoCAD product installed, they do not need these COM dll
    file. If they do not have the same AutoCAD product, your .NET app will not
    work, even you give them those COM dll files.

    File location is irrelevant: the com dlls are registered with Windows
    registry, the Interop dll wrapper uses Registry to locate COM dll.
     
    Norman Yuan, Mar 30, 2005
    #8
  9. Tim Riley

    Tim Riley Guest

    Norman:

    I am not using COM at all, only AutoCAD's .NET API (acdmgd.dll and
    acmgd.dll).

    Tim Riley
     
    Tim Riley, Mar 30, 2005
    #9
  10. net dll don't need published, signed, or strong named to be used, only if
    you want them in the GAC. I never do that with mine, either.

    For 2005, Adesk strong named their dlls so you need to provide a copy of
    the ones you are using and create an acad.exe.config file with binding
    redirects if you are using different versions than those already installed
    - i.e. you wrote in vanilla acad, enduser has mechanical.

    If you are writing to 2006, don't use the local copy and you don't need to
    send the dlls. Strong names are gone in 2006 and 2006 is set to handle
    adjusting to the appropriate dll version.

    -- Mike
    ___________________________
    Mike Tuersley
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Mar 30, 2005
    #10
  11. I'd say both =)

    Oversight -
    For 2005, Adesk strong named their dlls so you need to provide a copy of
    the ones you are using and create an acad.exe.config file with binding
    redirects if you are using different versions than those already installed
    - i.e. you wrote in vanilla acad, end user has mechanical. It'd look
    something like this:

    <configuration>
    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
    <assemblyIdentity name="acmgd" publicKeyToken="7208edf2a10162b1"
    culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535"
    newVersion="16.1.84.0" />
    </dependentAssembly>
    <dependentAssembly>
    <assemblyIdentity name="acdbmgd" publicKeyToken="7208edf2a10162b1"
    culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535"
    newVersion="16.1.84.0" />
    </dependentAssembly>
    </assemblyBinding>
    </runtime>
    <startup>
    <!--Adesk always uses the latest version of the framework installed on the
    computer. If youare having problems then explicitly specify the framework
    version. For example, to specify .NET 1.1 uncomment the following line.
    <supportedRuntime version="v1.1.4322"/>
    -->
    </startup>
    </configuration>

    Design choice -
    If you are writing to 2006, don't use the local copy and you don't need to
    send the dlls. Strong names are gone in 2006 and 2006 is set to handle
    adjusting to the appropriate dll version.

    -- Mike
    ___________________________
    Mike Tuersley
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Mar 30, 2005
    #11
  12. Oh, I should add that I don't strong name my dlls because they are not
    exposed to COM - otherwise I would

    -- Mike
    ___________________________
    Mike Tuersley
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Mar 31, 2005
    #12
  13. Isn't strong naming required for COM components?
     
    Frank Oquendo, Mar 31, 2005
    #13
  14. Tim Riley

    Tim Riley Guest

    He said he's not using COM so he doesn't have to strong name.

    Tim Riley
     
    Tim Riley, Mar 31, 2005
    #14
  15. That's not what I asked. His comments imply that strong naming is
    optional so I'm checking my memory to make sure it's still functioning
    correctly.
     
    Frank Oquendo, Mar 31, 2005
    #15
  16. for COM components.
     
    Frank Oquendo, Mar 31, 2005
    #16
  17. I believe strong naming is required for COM component access but that may
    very well have changed. I haven't done one in ages and haven't kept up on
    it - that's the nice part of writing stand alone, self contained apps ;-)

    Having said all that, since adesk has abandoned using sn in 2006, that
    would suggest that it is optional....not really sure, I'll have to test it.

    -- Mike
    ___________________________
    Mike Tuersley
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Mar 31, 2005
    #17
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.