edgarmora4033
asked on
How to provide an additional/extra dll file when deployin a feature in sharepoint?
In MOSS, I have a feature that has a receiver assembly and a receiver class specified. The receiver class extends SPFeatureReceiver. Inside the receiver class, I have implemented my code for the FeatureActived method.
My code inside the FeatureActivated method, is attaching an additional in-house dll to add an event to a given list.
In code it look similar to:
MyList.EventReceiver.Add(S PEventRece ceiverType .ItemAddin g,
in-house-assembly, class-iniside-the-in-house -assembly)
where in-house-assembly contains teh assembly information and the class-inside-the-in-house- assembly is as per the name describes it.
So far, I have been able to make this solution to work on the condition that the additional in-house dll has been previously installed into the GAC (gacutil /if in-house-assembly.dll)
My question: is there any way I can provide the additional in-house dll as a file, module, resource or whatever other way, to the feature, and to make the feature to install this addditional dll int the GAC, before the FeatureActivated method being executed? If so, how can I achieve this?
Thank you in advance,
Edja
My code inside the FeatureActivated method, is attaching an additional in-house dll to add an event to a given list.
In code it look similar to:
MyList.EventReceiver.Add(S
in-house-assembly, class-iniside-the-in-house
where in-house-assembly contains teh assembly information and the class-inside-the-in-house-
So far, I have been able to make this solution to work on the condition that the additional in-house dll has been previously installed into the GAC (gacutil /if in-house-assembly.dll)
My question: is there any way I can provide the additional in-house dll as a file, module, resource or whatever other way, to the feature, and to make the feature to install this addditional dll int the GAC, before the FeatureActivated method being executed? If so, how can I achieve this?
Thank you in advance,
Edja
ASKER
raybies,
I am going to try your proposed solution. To me, it looks like it should work.
Question I have before Irying your proposed solution, is related with WSPBuilder. All my development has been done usiing WSPBuiilder. I do not find the manifest.xml file on my harddisk - I assume WSPBuilder removes the manifest.xml file as part of its cleanup process. So, do you know how can I achieve your proposed solution using WSPBuilder?
Thank you in advance,
Edja
I am going to try your proposed solution. To me, it looks like it should work.
Question I have before Irying your proposed solution, is related with WSPBuilder. All my development has been done usiing WSPBuiilder. I do not find the manifest.xml file on my harddisk - I assume WSPBuilder removes the manifest.xml file as part of its cleanup process. So, do you know how can I achieve your proposed solution using WSPBuilder?
Thank you in advance,
Edja
Event easier then just build the solution with your additional dll in the release folder.
ASKER
raybies,
I need to understand what you are saying. Are you telling me that if I copy my additional
in-house-assembly inside the release folder of the project that activate the feature,without telling anything on configuration files to the feature project or registering the dll in the gac, the feature will recognized and it will work? Should I register the in-house-assembly in the references of the feature project (the one built using WSPBuilder)? I truly think, if your solution works, it will be the cleaneest solution for my problem.
Let me know your comments asap.
Edja
I need to understand what you are saying. Are you telling me that if I copy my additional
in-house-assembly inside the release folder of the project that activate the feature,without telling anything on configuration files to the feature project or registering the dll in the gac, the feature will recognized and it will work? Should I register the in-house-assembly in the references of the feature project (the one built using WSPBuilder)? I truly think, if your solution works, it will be the cleaneest solution for my problem.
Let me know your comments asap.
Edja
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
raybies,
It worked perfect!
Thanks a lot.
Edja
P.S.: Last night I could not test because I did not have access to the machine that hosts my sharepoint development.
It worked perfect!
Thanks a lot.
Edja
P.S.: Last night I could not test because I did not have access to the machine that hosts my sharepoint development.
ASKER
Very clear instructions to follow.
Very helpful solution.
Thanks a lot!
Edja
Very helpful solution.
Thanks a lot!
Edja
ASKER
raybies,
As a matter of technical interest, I would like you to add more info about the other 2 ways of getting same result.
I think another way will be configuring the library project to generate the release .dll file into the release folder of the WSPBilder project. Is this one of the other ways you were thinking? And which is(are) the other(s)?
Thank you,
Edja
As a matter of technical interest, I would like you to add more info about the other 2 ways of getting same result.
I think another way will be configuring the library project to generate the release .dll file into the release folder of the WSPBilder project. Is this one of the other ways you were thinking? And which is(are) the other(s)?
Thank you,
Edja
Edja, the other 2 ways:
1.- You can also add it as a reference with copy local
2.- create a new directory called GAC on the project root and copy your dll there.
1.- You can also add it as a reference with copy local
2.- create a new directory called GAC on the project root and copy your dll there.
ASKER
raybies,
Thank you for your comments. First way I knew. Second one is new for me.
I appreciate this info.
Edja
Thank you for your comments. First way I knew. Second one is new for me.
I appreciate this info.
Edja
There's an <Assemblies> node an under here you can add more dll's.
Open in new window