Can I mix GAC and Bin in the same project?

May 20, 2009 at 10:35 AM

Hi Everyone.

I have just started using WSPBuilder and have been wondering if it is possible to generate a Visual Studio project where some components get deployed to the GAC and others get deployed to the bin folder?

I have normally achieved this using two VS projects, one that contains GAC items (such as feature receivers) and another project that contains code, such as web part code that goes into the bin.

Ideally, I would like to keep all of this code in one project so it sits together, but was wondering if this can be done, or if I need to stick with my process of putting all my feature receivers in one project and all my web parts in another project (or a project per web part) and then all my logic in a Core code project?

Thanks

Mark 

May 20, 2009 at 8:04 PM

I think you just need to set your target type to "Auto" instead of "GAC" in the WSPBuilder.exe.config file.  Also you'll need to have the proper folder structure, i.e. a folder called "80" for web app dlls, and "GAC" for global assembly ones.

May 27, 2009 at 12:42 PM

I realised the silliness of what I was trying to do.

I was putting my class files (.cs) into the GAC or 80 folder and thought that WSPBuilder would step in and compile the assemblies into the right place.

I realised very quickly that was silly and that the build target in the project properties needs to put the commpiled dll files into either the GAC or 80 folder.  Then WSP Builder will deploy them to the right place.

Still not figured out how to have both GAC and 80/bin assemblies in the same project.  For now everything is in the GAC.

 

Mark Stokes
http://sharepointstudio.com