Pregunta

Tengo un problema en el que puedo habilitar una función la interfaz de usuario y todo funciona como se esperaba a través de la configuración del sitio, pero si lo intento y habilitar la función a través de la Sharepoint PowerShell (que estamos haciendo como parte de una implementación mediante scripts) , me sale el siguiente:

Enable-SPFeature: Error al crear objeto receptor del conjunto "xxxxx, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 967e6960f5af91e6", clase "xxxxx.EventReceiver" para característica "xxxxx.Public.Search" (ID: 026d7c45-a359-4550-822d-1a6c35e58e0 d) .: System.ArgumentNullException: El valor no puede ser nulo. Nombre de parámetro: Tipo

¿Alguien sabe por qué esto ocurriría, o algunas cosas que debería comprobar? La definición característica es sin duda correcta (ya implementarlo a través de las obras de interfaz de usuario como se esperaba, y también he comprobado el doble de la PublicKeyToken es correcta, etc, etc), y reiniciar los servicios y iisreset no me habilitado para usar Enable-SPFeature tampoco.

¿Fue útil?

Solución

Tengo el mismo problema. Lo curioso es cuando se abre una nueva ventana de PowerShell SP2010 y vuelva a emitir la misma orden el conjunto se encuentra sin ningún problema. Ver: http://khurramdotnet.blogspot.com/2011/01/enable-spfeature-command- throwing.html

Otros consejos

Try this: go to the Control Panel, click on "Programs", click on "Programs and Features", select "Microsoft SharePoint Server 2010" (or whatever you have installed), click "Change", select "Repair" and click "Continue". This is what helped me.

Try this: http://geoffwebbercross.blogspot.ca/2011/06/failed-to-create-receiver-object-from.html It worked for me, I did not have to change a stitch in my code / solution

I had this yesterday, turns out the feature name and the feature receiver name werent matching. To resolve it I copied the FeatureActivated code into notepad (entire code block) or whichever events it is you have coded.

  1. Copy the entire event code that you have written I.e. the FeatureActivated method (including signature)
  2. Remove the EventReceiver from your project.
  3. Add a new event received to your project (you can double check the name for changes)
  4. Paste the Event code back into the event receiver.

I use the following code to deploy using powershell

    if(($Solution -ne $null) -and ($Solution.ContainsWebApplicationResource))
    {
        if ($FeatureScope -eq "Web")
        {
            Install-SPSolution $SolutionName -url $siteUrl -GACDeployment -Confirm:$false
        }
        else
        {
            Install-SPSolution $SolutionName -AllWebApplications -GACDeployment -Confirm:$false
        }
    }
    else
    {
        Install-SPSolution $SolutionName -GACDeployment -Confirm:$false
    }
    while($Solution.Deployed-eq$false)
    {
        Start-Sleep 2
        Write-Host "." -NoNewline
    }

Don't use the "normal" PowerShell, use the SharePoint 2010 Management Shell instead.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top