Webpart missing webpart catalog entry when build with vsewss but deployed with stadm - sharepoint

I have the exact problem of not getting any webcatalog entry for a webpart if i deploy via stsadm. The project of this webpart is generated with vsewss and build with it. The very webpart entry can be accessed if its deployed through vsewss' "deploy" command. But i have to make the deploy process with stsadm because of an automation reason.
any ideas ?
thanks a lot.
koray.

You need to activate the features when deploying via stsadm, VSeWSS does that for you and hides the need while you are developing.

Related

Custom workflow action deployment on multi server farm

I created a wsp solution that which create 2 custom workflow actions. I want to deploy it to my 2 servers farm which have an application server and a webfront end server. SPF Web application is not activated on the app server.
My visual studio solution goes like this:
-One project which create the dll, where actions code is.
-One project which create the wsp package, feature, etc. The package references the other project as additional assembly.
My problem is, when I deploy my wsp package with Deployment Server Type WebFrontEnd, the feature is only installed on the wfe and I can't activate it. I can't see the feature in the manage feature page (the feature is farm level). When I change the Deployment Server Type of the package to ApplicationServer, I get the following message:
"This solution must be deployed to application servers, not front-end Web servers. It cannot contain a resource that is scoped to a Web application."
I did some tests. I removed the additional assembly from my package and then I can deploy my wsp solution as ApplicationServer type (but can't use my custom actions..). Then I created a dummy dll with nothing in it, added it as additional assembly to my sharepoint package and I realised I can't deploy my wsp as ApplicationServer type again.
So, can I reference an additional assembly from my wsp solution and still deploy as ApplicationServer type??
How can I deal with this? Any idea?
I did it again, I've been looking for answers for this all day, I finally post something here and one hour later, I got myself the answer. Here it is anyway.
I deployed independently both solutions using 2 wsp packages. One simply deploys the dll into the gac (and is ApplicationServer), the other one is using it without deploying it itself (and is WebFronEndServer). Now I have to deal with making sure the first one is deployed before using the other one... Feature activation dependency should do it.
Regards.

Deploying SP2010 custom state machine workflows into a production site

I have a dev environment with VS2010 and SP2010 installed in and a production environment running SP2010. I have created a state machine workflow in VS2010 and deployed to my dev environment for testing. Now that I have things working the way I want I need to deploy the workflow into my production environment.
In VS2010 I have selected "Package" and taken the resulting .wsp file and attempted to deploy them on my production site by going to Site Settings -> Solutions and uploading. I have also activated the solution within the solution gallery and ensured that it is also activated in "Site collection features". However, the workflow does not show up in Site Settings -> Workflows and I can't seem to out what to do. I have also tried deploying the .wsp through stsadm addsolution.
What am I missing when deploying a custom built workflow packaged as a wsp?
Your first method of deploying solution by uploading it to Site Settings -> Solutions applies to only sandboxed solutions. Are you sure yours is a sandboxed solution ?
The second method which you tried is a global method of deployment through stsadm.
I would suggest, start from scratch i.e. clean up your local Solutions gallery. and use stsadm operations addsolution, deploysolution and activatefeature to deploy this workfow.
Note that deploysolution and activatefeature can also be done via UI.

How to change deploy server in visual studio 2010 for web part?

I have a web part that I have been deploying to Server A. I now have a new SharePoint environment I would like to deploy my web part to (Server B). How can I set the web part solution to deploy to Server B rather than Server A? I have done this before but cannot find the place to do it.
Thanks.
To Deploy from Visual studio, VS needs to be installed on the server you're deploying to. To change the site you're deploying to for development/debugging purposes is a property on the project file in VS.
Shane
To clarify select the project in solution explorer then edit the Site URL property in the Properties toolbox, do not right click and select properties.
In order to deploy to a remote SP application, I recommend using PowerShell scripts that are run on the remote server. That is what I did, and it works well. Much easier than stsadm.
Change the Site Url in Project Properties to deploy in desired server.
u can use stsadm command to deploy into new server

The solution contains no Web application scoped resource,

I need little help regarding sharepoint solution set up in sharepoint.
I created wspbuilder project(12 hive structure including controltemplates folder)
I have created project for user controls(like login logout etc) and when I build them the .ascx files are being added to 12\controltemplates folder(I wrote postbuild event to add .ascx as controltemplate)
There are no compilation errors. I built wsp and added it to solution store. But when I am trying to deploy it to the specific web application I can see no selection of web application in deploysolution window.
It is saying
The solution contains no Web application scoped resource, and therefore cannot be deployed to a particular Web application. It can only be deployed globally.
I think the problem is adding safecontrols to the manifest.xml. When I build the wsp no safe controls are adding to the maifest.xml. I included deploymenttarget to GAC in wspbuilder.exe.config file also.
my feature.xml is as follows
<Feature Id="DBF94C51-A4AB-4c47-BD97-74D3795C6A63"
Title="site feature"
Description="My sharePoint features"
Version="1.0.0.0"
Scope="Site"
Hidden="FALSE"
DefaultResourceFile="core"
xmlns="http://schemas.microsoft.com/sharepoint/"
ReceiverAssembly="[[4part assembly name]]"
ReceiverClass="[[Receiver class]]"
>
How I can resolve this issue. I want to deploy the wsp to specific webapplication only.
Thank you.
if you are registering safecontrols, you need to scope the feature at the web application level so it know which web.config to update. Change the scope to WebApplication and it will know which web.config to deploy to.
Also when using stsadm use the -url switch to supply the web application you need.
Shane
How are you deploying this - what are the exact STSADM commands you are issuing? Do they match the scope in your Manifest file?
http://msdn.microsoft.com/en-us/library/bb861828(office.12).aspx
ohh actually it was my mistake..sorry for the disturbance.
I didn't include the key value in the wspbuilder.exe.config file. I am taking the safe controls into other specified folder in the solution. I had to include in the config file.
Now everything is fine. Thanks for the help.
I did kind of same observation as you.
I don't think it is related to gac or bin deployment of the dll, but only if there is safecontrol included.
Here is how to do it in SP2010:
http://rasor.wordpress.com/2011/12/04/sp2010-wsp-global-or-not/

WSPBuilder questions for first-time webpart

I have made my first webpart using WSPBuilder. When I try to deploy it using STSADM, I get an error stating access is denied. I am an admin on the machine (well it's a VM).
Also, with WSPBuilder, do I need to change the config files (I assume no as the point of the tool is to automate this)?
Thanks
There could two reasons for your problem
Even though you are the admin of the system you may not have privilege in central Administration. So login in the system with the user name of sharepoint administrator and try to deploy it.
There may be a problem in the way you created the WSP. if you deploy webpart using WSP then there is no need to edit the config file manually. Recently I have created a blog which explain how to create simple webpart, creating WSP and deployment. If interested check it out http://www.allaboutmoss.com/index.php/2010/03/22/hello-world-sharepoint-webpart-for-beginners/
It sounds like you don't have enough permissions to add the webpart. What OS are you on? If it's Windows Server 2008 R2 etc you will have to run the command prompt as an administrator or turn off UAC for administrators. As for the config WSP builder will create you a file called solution.txt which contains the Id for your solution. For more control over what it is doing you can add a WSP Builder config file to your project called "WSPBuilder.exe.config". An example one can be found in "C:\Program Files\WSPTools\WSPBuilderExtensions".
Go to --> RUN--> SERVICES.MSC--> check the following service is started or not.
Windows SharePoint Services Administration, if not pls start this service. if the wsp is deployment done. go center admin--> Operations -->Global Configuration -->Solution management . This page has a list of the Solutions in the farm. check ur wsp in this list.

Resources