This project is read-only.
2
Vote

2013 fails when site collections are selected

description

Hi,

I have a bug in the 2013 version. I have a site scoped feature. It also contains a farm and web scoped feature as well but i am only worried about the site scoped one.
The configuration file is set to site scope and contains 1 feature ID for the site feature.

The problem i have found that when you install the WSP and select a sitecollection to install against. The installer thinks there is a web app feature and tries to activate one (which doesn't exist). This then causes an error (displayed below). Another knock on issue is that the solution is left added but not deployed. This means if you rerun the setup it errors as the final check fails. You have to remove the solution to rerun the installer.

If you do not select a site collection then the installation works fine.

I have had a look in the code but cannot see where the issue is occuring.

The error i get is
Info: ***** SOLUTION DEPLOYMENT *****
Info: Installing solution at level 15: MYFeature.wsp
Info: solution ContainsWebApplicationResource: False, applications: 1
*Error: ***** ERROR *****
*Error: Exception has been thrown by the target of an invocation.
 Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.SharePoint.SPException: This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application.
   at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.CheckDeployParameters(Collection`1 collWebApps, Boolean globalInstallWPPackDlls, Boolean force, Boolean checkIfDeployed)
   at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.CreateSolutionDeployTimerJob(DateTime dt, Collection`1 webApplications, SPSolutionDeploymentJobType jobType, Boolean globalInstallDlls, Boolean force, Boolean isRestore, SPCompatibilityRange compatibilityRange)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at CodePlex.SharePointInstaller.CompatibilityDeployer.Deploy(SPSolution solution, Collection`1 applications, Int32 minCompat, Int32 maxCompat, ILog log)
   at CodePlex.SharePointInstaller.InstallProcessControl.CreateDeploymentJobCommand.Execute()
   at CodePlex.SharePointInstaller.InstallProcessControl.TimerEventInstall(Object myObject, EventArgs myEventArgs)

     Inner Exception: Microsoft.SharePoint.SPException: This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application.
   at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.CheckDeployParameters(Collection`1 collWebApps, Boolean globalInstallWPPackDlls, Boolean force, Boolean checkIfDeployed)
   at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.CreateSolutionDeployTimerJob(DateTime dt, Collection`1 webApplications, SPSolutionDeploymentJobType jobType, Boolean globalInstallDlls, Boolean force, Boolean isRestore, SPCompatibilityRange compatibilityRange)
I can consistently replicate the issue on both windows 2008 R2 and 2012.

A fix or clues to a fix would be super.

Thanks

comments

PerrySharePoint wrote Oct 18, 2013 at 4:40 PM

This looks like it may be the same issue as (q.v.) https://sharepointinstaller.codeplex.com/workitem/24723

wrote May 22, 2014 at 8:34 AM

PerrySharePoint wrote Apr 7, 2016 at 2:02 AM

This is years old; hopefully it has been fixed in the newer versions?