Author Topic: Can I use the netmodules instead of DLL in my Entry Point?  (Read 2025 times)

0 Members and 1 Guest are viewing this topic.

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Can I use the netmodules instead of DLL in my Entry Point?
« on: March 14, 2015, 04:12:31 PM »
In my applications I use the principle of Entry Point. I described this idea here. Pay attention: besides an entry point (DLL-file) I create additional DLL files, so each of them can be loaded into own AutoCAD version, instead of Entry Point using. That DLL files were created on the base of the same code sources, but has own .NET Framework version, and references to AutoCAD libraries.

But I want to allow to load of the Entry Point only. I know, CLR can not load the modules (i.e. *.netmodule-files). I can create the netmodule-files and use one of them through /addmodule when I will compile my Entry Point. But other modules with the same content...

In my old decision, I in the code of my entry point define, base on Major.Minor version what DLL must to be loaded. But how similar to make with modules?

Is it possible - to do what I want?

tetrahidrocannabinol

  • Guest
Re: Can I use the netmodules instead of DLL in my Entry Point?
« Reply #1 on: March 14, 2015, 06:14:32 PM »
Really i do not understand what you want to do, but you can convert a *.netmodule file in an assembly, modify the framework, change references... simply changing a few bytes. And you can integrate this in your msbuild hook. In any case, I think I begin to understand what "the point of entry" and other of your posts related to this. It really seems a good idea

The attached file is an example (only source) of an external tool that converts .netmodule files  to assemblies (In this case is not enough to change a few bytes). I am not the author.

In case anyone had not noticed : I do not speak English, therefore I hope you excuse any mistake.


Andrey Bushman

  • Swamp Rat
  • Posts: 864
Re: Can I use the netmodules instead of DLL in my Entry Point?
« Reply #2 on: March 15, 2015, 01:01:55 PM »
Really i do not understand what you want to do ... you can convert a *.netmodule file in an assembly
Yes, you aren't understanding me - I don't want to convert a netmodule to an assembly.
you can convert a *.netmodule file in an assembly... simply changing a few bytes.
I am doubting, because a netmodule has not a manifest. :)
In case anyone had not noticed : I do not speak English
I noticed. :)
« Last Edit: March 15, 2015, 01:05:36 PM by Andrey Bushman »

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Re: Can I use the netmodules instead of DLL in my Entry Point?
« Reply #3 on: March 15, 2015, 03:01:11 PM »
An answer: it is inpossible, because the platform of module must to be the same like the platform of Entry Point. For example, if I want for AutoCAD 2009 create module as x86 and x64 (instead of AnyCPU), then it cannot to be used in the Entry Point which is AnyCPU. Then the meaning of creation of entry point will be losting.
« Last Edit: March 15, 2015, 03:05:08 PM by Andrey Bushman »

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Re: Can I use the netmodules instead of DLL in my Entry Point?
« Reply #4 on: March 15, 2015, 04:10:10 PM »
Attached file is the same .net-extension, what I published here, but with netmodules. So, as I wrote before, it is impossible to use the same Entry Point DLL file for all AutoCAD versions if netmodules are used.