0

I am creating a custom component (comp A) which is used by 4-5 other winform projects in the same solution. The issue is while installing the app, the user might select at the minimum one project to install or more. S/he might install another project later.

I want these projects to access the same copy of the component, at any point of time. I don't want to each of these projects to have a separate copy of the component.

How do i achieve this?

Jameel
  • 1

1 Answers1

1

You should install your component in the Global Assembly Cache and reference it from there, instead of directly referencing the DLL on disk.

madd0
  • 9,053
  • 3
  • 35
  • 62
  • Thanks madd0 for the quick response. Is it the only option? Are there any other options too? – Jameel Mar 12 '11 at 11:46
  • @Jameel: madd0 is correct. You could use MEF to load the component from a location in the disk but it wouldn't make any sense to do that instead of using the GAC. The GAC also has the advantage to support multiple versions of the same component in case one app uses a more recent version of the component than the others. In short, the GAC was made for what you want. – Fabian Nicollier Mar 12 '11 at 13:34