Hello,
I´m trying next example
http://msdn.microsoft.com/en-gb/library/ff630942.aspx
but I have the error:
‘Microsoft.SharePoint.SPContentTypeCollection’ no contiene una definición de ‘Cast’ ni se encontró ningún método de extensión ‘Cast’ que acepte un primer argumento de tipo ‘Microsoft.SharePoint.SPContentTypeCollection’ (¿falta una directiva de uso o una referencia de ensamblado?
With Google Translate ;
‘Microsoft.SharePoint.SPContentTypeCollection’ does not contain a definition for ‘Cast’ and found no extension method ‘Cast’ accepting a first argument of type ‘Microsoft.SharePoint.SPContentTypeCollection’ (are you missing a using directive or reference assembled?
The problem is in the line:
SPField newField = spWeb.Fields .Cast<SPField>() .FirstOrDefault(f => f.StaticName == “Team Project”);
Some idea?
Regards,
María
Hello all,
I´ve done several changes.
Now I´m deploying the solution with a user granted as “db_owner” in all SharePoint databases.
I cant check the “Feature scope”… I dont know where to see the scope of the Feature (right button, properties???)
At this moment, I can generate the solution, but when I try the deploy, I get the error:
Error 1 Error en el paso de implementación ‘Reciclar grupo de aplicaciones de IIS’: No se puede conectar con el sitio de SharePoint: http://localhost/SampleWebSite/. Asegúrese de que la dirección URL especificada es válida y de que el sitio de SharePoint se está ejecutando en el equipo local. Si movió este proyecto a un nuevo equipo o si la dirección URL o el sitio de SharePoint han cambiado desde que creó el proyecto, actualice la propiedad URL del sitio del proyecto. 0 0 CreateContentType
Translate to English:
Error 1 Error in deployment step ‘Recycle IIS Application Pool’: Can not connect to the SharePoint site: http://localhost/SampleWebSite/. Ensure that the specified URL is valid, that the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL or the SharePoint site has changed since you created the project, update the Site URL property of the project. 0 0 CreateContentType
I have the solution in the same machine with the SQL Server databases. But I would like to deploy the solution here, but I need to implement the package in other diferent server.
Thank you for your patient!
María