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

AppSearch and GAC


4 replies to this topic

BFealy

BFealy
  • Full Members
  • 35 posts

Posted 27 March 2009 - 20:12

Hi All,

I'm having a problem I hope someone can assist me with. I'm trying to detect one of our DLLs installed into the GAC and what version of the DLL is present.

The dll is part of a SharePoint solution installed via a WSP package, not through an MSI. We have several 4.0.X.X and 4.5.X.X versions in the wild and the main concern is the first two digits.

I've got an AppSearch set, with the following rows in the tables:

AppSearch:
FOUNDV40 gacsearch40
FOUNDV45 gacsearch45

Signature: (Signature, fileName, MinVersion, MaxVersion)

gacsearch40 File.name.dll 4.0.0 4.5.0
gacsearch45 File.name.dll 4.5.0 4.6.0

DrLocator: (Signature, Path, Depth)

gacsearch40 [GlobalAssemblyCache] 1
gacsearch45 [GlobalAssemblyCache] 1

I've also tried using File.Name instead of File.Name.dll in the Signature table to no avail.

In both searches, the log shows several Note:1322 and Note:1325 values when the action is being performed and the found properties aren't created.

Any help is appreciated.

I welcome alternatives to the AppSearch approach as well, if anyone is familiar with detecting a SharePoint solution and its version via another means.

Thanks,
Brian

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 28 March 2009 - 06:54

The first problem here is that the Parent column of the DrLocator table should be a cross-reference to the Directory table; it doesn't resolve properties. So you would have to use GlobalAssemblyCache without the square brackets.

But I'm not sure if AppSearch works for assemblies in the GAC. You may need to call some .NET function to query the GAC.

BFealy

BFealy
  • Full Members
  • 35 posts

Posted 31 March 2009 - 18:23

My apologies for not making the little parentheticals next to the table name clearer, the values listed there are the only values I've filled in on the tables...if I didn't list a parenthetical, then I filled in all columns.

In my above post, the Path entry is the one containing the [GlobalAssemblyCache] and the Parent column for those searches is null.

Do I need to enter a parent for the GAC search? My other searches for items use [CommonFilesFolder] with brackets in the Path column and have no parent, so I had hoped the GAC folder would be similar.

I'm loathe to add any custom actions that would require added overhead, but it's looking more like I may have to.

Has anyone worked this way with the GAC in the past and might be able to share some advice?

Much appreciated,

Brian

Edit: Submitted too soon, edited content.

Edited by BFealy, 31 March 2009 - 18:26.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 03 April 2009 - 12:02

Sorry for misreading your post. In the Path column the square brackets are correct, and the Parent can be null in this case. However check the log for the value of the GlobalAssemblyCache property.

BFealy

BFealy
  • Full Members
  • 35 posts

Posted 13 April 2009 - 17:09

Thanks Stefan.

I ended up having to write a custom action to iterate through the GAC and find our assembly. It then feeds the version back to the installer. The scope for the project had increased to support several older versions of our application, so we needed some additional logic.

Brian