1
votes

I'm attempting to install a dll shared by multiple projects to the GAC, using Visual Studio's setup and deployment project. I've strongly named my assembly, and set the output folder of the project primary output to 'Global Assembly Cache folder'.

Strongly named assembly capture

Project output properties capture

File System of Setup Project

After building and installing the executable, I've received no errors. However, using the GacUtil, I can confirm that the dll was not added to the GAC. What am I missing?

I've scoured Stackoverflow and other sources, but haven't found an explanation.

GAC Util output

2
Not entirely clear if you have right clicked the "File System on Target Machine" top node and done Add Special Folder => Global Assembly Cache Folder? I am not up to speed on the new GAC. Recommend you go for WiX or another tool (some reasons why). And here is a WiX quick-start tip collection. - Stein Åsmul
Yes, I have followed the steps you mentioned to add the special folder 'Global Assembly Cache Folder'. I'll add a screenshot of the File System of my project to my original question. - AllisonCamp

2 Answers

0
votes

Assembly Tables: I'll just add an attempted answer, no time to test. In the compiled MSI of yours, is there anything in the tables MsiAssembly and MsiAssemblyName? Are the tables there at all? And it seems manual installation to the GAC works fine? (so no strong name issues).

GAC Folder: Not entirely clear if you have right clicked the "File System on Target Machine" top node and done Add Special Folder => Global Assembly Cache Folder?

GAC

"Add Assembly...": Make sure you add the file as an assembly as illustrated here, and add it to the Global Assembly Cache folder:

Assembly

A Tale of Two GACs: I am not up to speed on the new GAC. Just an issue to be aware of and test. How to view the Folder and Files in GAC?:

  • .NET 1.0 - NET 3.5: c:\windows\assembly (%systemroot%\assembly)
  • .NET 4.x: %windir%\Microsoft.NET\assembly

Alternative Tools: Recommend you go for WiX or another tool. And yes, there are some good reasons why. Here is a WiX quick-start tip collection. Advanced Installer has some free features for simple requirements.


Links:

0
votes

Creating a separate setup project for the dll allowed successful installation of the assembly to the Global Assembly Cache. Therefore, the issue I was experiencing was most likely due to something in my original project, which included a large host of outputs. I'll most likely keep the assembly in its own installer and use this installer as a required prerequisite for applications that expect the assembly.

Thank you Stein for the fantastic resources. I hope this thread helps other users in the future.