Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

InstallShield - Components - .NET options


5 replies to this topic

FrankSpierings

FrankSpierings
  • Members
  • 22 posts

Posted 29 December 2005 - 09:23

I'm repackaging applications which contain Microsoft .NET components.

I require more information to make a decent package. I do not have serious problems at the moment with these components, but i need more information about how the .NET system works.
I have read several articles from MSDN and the InstallShield help, but i'm not quite sure i really understand it all.

InstallShield component (at .ism build time) can contain several .NET properties / options.
- NET scan at build; I believe (from what i've read and tested) this option will make IS scan the keyfile of the component and fill the MsiAssembly(Name) tables. What i don't understand about this option is what it does, when a assembly is private (not installed in GAC). I would like more information about this.

- NET Installer Class; I don't know much about this option. Am i correct that this option will trigger methods within the assembly for installation and removal etc. ?

- NET Installer Class Arguments; Probably the arguments to be parsed to the methods (.NET Installer Class methods)

- .NET COM Interop; This is necessary for to allow COM objects to call the .NET assembly. I'm not sure if i need to enable this option for components with interop assemblies which have been snapshotted, because i believe these keys are already in my package. Am i correct that this is the HKCR\Record entry ?

- .NET Precompile Assembly; This will make the component load faster since its compiled in the native image cache. Normally only the methods called inside the component will be compiled.

If u have links to resources (or answers) to question please let me know. I understand a bit of programming, but i don't want to read the full .NET Framework SDK to understand what a decent .NET package should look like.

Thx in advance

Frank Spierings



... Please don't let me down on this one Stefan smile.gif

Edited by FrankSpierings, 29 December 2005 - 16:34.


mpento

mpento
  • Full Members
  • 38 posts

Posted 29 December 2005 - 18:12

Hi Frank,

I am working on a project that has some .NET components and might be able to at least add my 2 cents if not actually answer some questions.

QUOTE

- NET scan at build; I believe (from what i've read and tested) this option will make IS scan the keyfile of the component and fill the MsiAssembly(Name) tables. What i don't understand about this option is what it does, when a assembly is private (not installed in GAC). I would like more information about this.


I like to think of this option as the "COM Extract at Build" for .NET components, which might not be quite right, but helps me to sort it out in my mind. In my project, I have a bunch of components which have "Dependencies and Properties" selected but are not stored in the GAC. I was always under the impression that this just did nothing when not needed. I could be wrong though.

QUOTE

- NET Installer Class; I don't know much about this option. Am i correct that this option will trigger methods within the assembly for installation and removal etc. ?


You are basically correct in this assumption. In the few projects that I have seen with .NET components being installed, I still have yet to see this option set to "Yes".

QUOTE

- NET Installer Class Arguments; Probably the arguments to be parsed to the methods (.NET Installer Class methods)


Correct again.

QUOTE

- .NET COM Interop; This is necessary for to allow COM objects to call the .NET assembly. I'm not sure if i need to enable this option for components with interop assemblies which have been snapshotted, because i believe these keys are already in my package. Am i correct that this is the HKCR\Record entry ?


You are also correct about this. If you have interop assemblies for your component which are part of the install, you should not enable this option as any information about the component that is needed will be gleened from the interop assembly.

Looks like you know more than you give yourself credit for, I hope my sad attempt at helping at least confirmed that for you is nothing else.
cool.gif

Thanks,
Mike
Michael J. Pento

Independent InstallShield Contractor
mjpento@NO_SPAM.comcast.net

FrankSpierings

FrankSpierings
  • Members
  • 22 posts

Posted 30 December 2005 - 09:23

Thx Mike,

I'm not so dumb after all biggrin.gif


About the first point:

QUOTE


- NET scan at build; I believe (from what i've read and tested) this option will make IS scan the keyfile of the component and fill the MsiAssembly(Name) tables. What i don't understand about this option is what it does, when a assembly is private (not installed in GAC). I would like more information about this.


I like to think of this option as the "COM Extract at Build" for .NET components, which might not be quite right, but helps me to sort it out in my mind. In my project, I have a bunch of components which have "Dependencies and Properties" selected but are not stored in the GAC. I was always under the impression that this just did nothing when not needed. I could be wrong though.


I know that it does something when installed into the GAC. I think that the ini file related to the .NET assembly will not be set when this option is off. Also i don't like the "scan for properties and dependencies" option, since the dependency scanning triggers an "internal build error" sometimes. So i often put it on "properties only".

I also found out yesterday that the .NET COM Interop = Yes option will indeed create a HKCR\Record registry key, but only when a .NET assembly is a true interop.
Problem here is that the description of an interop is quite cryptic to me. It has something to do with the .NET assembly being able to use an oldskool COM object. MS tells me that an interop is always a class which inherits its methods and properties from the class System.Runtime.InteropServices. Strange thing is that i've got a .NET component in which the manifest states this inheritance (using the tool ildasm in .NET SDK), but does not create a HKCR\Record entry.

So if anyone knows a bit more to help me and probably some other folks in the future, please let me / us know.

mpento

mpento
  • Full Members
  • 38 posts

Posted 30 December 2005 - 16:33

Hi Frank,

Yeah, I fear that my knowledge is rather limited in respect to .NET and sometimes I am not even sure if MS knows how the stuff really works and what it means. I go away from thier site scratching my head most of the time.

I would love to know more, but, who has time? Plus, I spent ages learning COM and now they changed to .NET!! sad.gif

Well, good luck with it, if I come up with any revallations in my own project that might help, I'll pass them along.

Thanks,
Mike
Michael J. Pento

Independent InstallShield Contractor
mjpento@NO_SPAM.comcast.net

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 01 January 2006 - 17:33

Hello Frank,

QUOTE
Please don't let me down on this one Stefan


it looks like you knowkedge of .NET is better than mine...
I think your assumptions of these InstallShield options are correct. But I don't know the answers to your .NET questions.

QUOTE
interop assemblies which have been snapshotted

If your snapshot already included these entries there's no point in adding them again. Cleaning up an msi pacjage that was created from a snapshot and converting it to a clean Basic MSI project isn't trivial.


FrankSpierings

FrankSpierings
  • Members
  • 22 posts

Posted 02 January 2006 - 10:20

Ok. Well than the package i'm building at the moment won't be the best i've ever made, but it will be good for the .NET experience. I will post more information if i come accross interesting .NET things, so other people can use it in the future. I will quit my job in March dough. So i hope i find some new stuff soon.

If anybody has tutorials or resources (eBooks etc) about .NET from an administrators point of view, please let me know, i'm really interested in that.

Thx for the replies