Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sptimer assembly cache problem when using (redeploy.bat) #6

Open
norvegec opened this issue Apr 7, 2015 · 1 comment
Open

sptimer assembly cache problem when using (redeploy.bat) #6

norvegec opened this issue Apr 7, 2015 · 1 comment

Comments

@norvegec
Copy link

norvegec commented Apr 7, 2015

Precondition:

  1. my.wsp is deployed as farm solution with -GacDeployment parameter. my.dll is in GAC.
  2. New feature is added to my.wsp with feature receiver. Package version isn't incremented, neither does assembly/file versions.
  3. When redeploy.bat is executed, uninstall-remove my.wsp worked fine, but add-install 'my.wsp' is exited with error in
The Execute method of job definition "SPSolutionDeploymentJobDefinition" threw an exception. 
Failed to create receiver object from assembly **ommited**
System.ArgumentNullException at System.Activator.CreateInstance(Type type, Boolean nonPublic)

Solution: If restart-service SPTimerV4 is called before installing new version of my.wsp then it is completed successfully.

@matthiaseinig
Copy link
Member

Thanks for reporting. Sounds like SPTimerV4 is still holding the code of the old assembly in runtime preventing you to update the receiver. But in regards of reducing downtime during the deployment process I would not restart SPTimerV4 in general. What you can do is to add a pre-deployment custom target in the CustomTargets.ps1 that runs either for all or only that specific WSPs (use the ProcessSolution hook for that) and calls RestartService "SPTimerV4" (this is the SPSD function in order to get the logging).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants