0
votes

I have application, let's name it Installer, that installs my assemblies in GAC using Publish.GacInstall Method.

I faced an issue when the Insteller is run under .Net 4.0 and installs assemblies in GAC for .Net 4.0. When I target .Net framework 2.0 for a project I don't see my assemblies in GAC.

Is it possible to install my assemblies in both GACs?

1

1 Answers

2
votes

No, it does not depend on your installer, but on the assemblies it installs. CLR v4 (.Net 4.0 - 4.5.1) assemblies go in the v4 GAC and CLR v2 (.Net 2.0 - 3.5) assemblies go in the v2 GAC. If you want an assembly in both, then you have to have two assemblies for each CLR version.

Since CLR v4 can run CLR v2 applications you can also do with just the CLR v4 assembly. You need change/add a config file with your application. See here.

<supportedRuntime version="v2.0.50727"/> 
<supportedRuntime version="v4.0"/>