Adding same assembly to GAC and BIN

Feb 19, 2008 at 9:32 PM
Because there is no WSP schema to modify the web.config, I will have to either create a feature to modify the web.config to include my assembly or I can include the assembly in both the GAC and the bin of the application. So I created my project with a GAC and an 80/bin folder. The same DLL is in both. When I deploy the solution, the DLL is copied to the bin of the application but it is never copied to the GAC (at least I don't see it there.)


Is this a bug, a feature, or am I doing something wrong?

Thanks.
Coordinator
Feb 20, 2008 at 9:00 AM
This is by design!

The DLL's that needs to go into the Global Assembly Cache should be put in the GAC folder. The DLL's that needs to go into the WebApplications bin folder should be put in the 80\bin folder. There is no point in adding the same DLL to the GAC and 80\bin folder because only one of them will be used.

For the web.config modifications, the WSPBuilder will automatically create SafeControl tags for all DLL's found in the GAC and 80\bin folder. Other modifications you will need to create a Feature receiver to modify it.

/keutmann



johnsmith1960 wrote:
Because there is no WSP schema to modify the web.config, I will have to either create a feature to modify the web.config to include my assembly or I can include the assembly in both the GAC and the bin of the application. So I created my project with a GAC and an 80/bin folder. The same DLL is in both. When I deploy the solution, the DLL is copied to the bin of the application but it is never copied to the GAC (at least I don't see it there.)


Is this a bug, a feature, or am I doing something wrong?

Thanks.

Feb 27, 2008 at 12:18 AM
Thanks for the reply.

That's what I thought. It is by design. However, it will be easier for me to put the DLL in both than write a feature to modify the web.config so I can put the <assembly> tag. If the DLL is in both, then it works fine but b/c of what it does, if it is only in the GAC then I will need the <assembly> tag for it. And if it is only in the BIN, then I need to run in WSS_Medium.