Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a solution in Visual Studio 2010 that is made up of 3 projects.

I have one project for my SharePoint 2010 custom timer job, one project (Project A) that is used by my custom timer job, and another project that is used by Project A.

The problem is that when I package my project the WSP only installs the Custom Timer Job to the GAC. Is there some way to have all dependant DLLs installed as well?

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted
  1. In the Timer Job project, open the package designer.
  2. Click Advanced (bottome of the designer)
  3. Click Add, and choose Add Assembly from Project Output.
  4. Select Project A

  5. Repeat selecting the other project.

All your assemblies will be in the Timer Job solution, and is the only one you need to deploy to SharePoint.

share|improve this answer
    
Ok, awesome. I got it to Add/Install alright but I don't see the assembly for Project B in my GAC. When the job tries to run i get this error: Could not load file or assembly 'ProjectA, Version.........' or one of its dependencies. The system cannot find the file specified. Any idea why it's skipping the last one? –  Abe Miessler Mar 29 '11 at 20:56
    
Review the ULS logs to see if there was an error during deployment. –  Paul Schaeflein Mar 29 '11 at 21:20
    
I looked a little more closely and it looks like it is trying to find the wrong PublicKeyToken. Do you know why this would happen? –  Abe Miessler Mar 29 '11 at 22:06
    
If you're the author of all three projects you should really be using the same SNK for all three projects. –  James Love Mar 29 '11 at 22:13
    
All three have the same PublicTokenKey, but for some reason it's looking for a different one when it runs Project A –  Abe Miessler Mar 29 '11 at 22:16
add comment

One problem having "shared" references in your main WSP is that if it is shared and you retract the WSP you will make all other solutions fail.

I tend to use a specific WSP that contains the shared references - this makes me avoid these kind of problems.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.