Making your own cusctom workflow developed in visual studio 2010 available in sharepoint designer 2010 - visual-studio-2010

Well my requirement is :
Need to develop a custom workflow,the workflow should take properties like site url, list names etc., From the client.
I am able to develop the workflow, but i need to make it available in designer. I tried the method mentioned here:
http://www.chaholl.com/archive/2010/03/13/make-a-custom-activity-available-to-sharepoint-designer-2010.aspx.
1)I have created the required action file.
2)deployed(copy-pasted) dll into gac.
3)made safe-control and authorized type entries in web.config of the corresponding web application(on which my site collection exists)
But it is not helping me out.after following the steps given,when i try to open any workflow in designer,it gives an error saying it cannot find an action(assembly) with xyz name.

If I understand correctly, you built an entire workflow and am trying to make it available to SharePoint Designer. The guide you are following deals with custom "Actions". Actions are a sub part of a workflow. This may explain why your deployment isn't working, because you're trying to deploy a workflow as an action.
If you could provide more information about your steps, we could try and figure it out.
Thanks
C
http://www.cjvandyk.com/blog

Related

a custom web part contains telerik mossradeditor controls. but this custom is not showing in sharepoint 2007 add web part page

I have created a custom web-part that contains telerik mossradeditor control. but this webpart is not displaying inside the add web-part page of SharePoint 2007.
this is happening only my prod environment but its working in stage and development environment.
Installed radeditorsharepoint version 5.5.1.0.
Please help me to resolve this..
Examine their online documentation and make sure you are following the appropriate steps: http://www.telerik.com/help/aspnet-ajax/moss-installing-radeditor-in-moss-2007-farm.html.
You need to have it installed on production as well, you may have missed some files.
About your own webparts, not the one Telerik provide - make sure it deploys properly. Check assembly references and make sure they use the correct versions. You may need a bindingRedirect in the site's web.config.

Coded UI Test Builder fails to generate code

The coded ui test builder is failed to generate code. i created the new test project and added the coded ui test file. i have chosed the option 1.Record options then the Test builder is running.
when i record the actions and trying to generate code
it is throwing error
"Object reference not set to an instance of an object"
Kindly help in this.
There is no simple answer to this from the very small amount of information in your question. Searching the web for the error message (eg searching for "coded ui Object reference not set to an instance of an object" and variations) provides many cases of people getting the same message plus, in some cases, their solutions.
One possible cause is that the UI Map file has been edited in a text editor, leaving XML that the Generate tool does not understand. Another possibility is that Visual Studio has become corrupted and should be reinstalled.
To narrow down the possibilities, determine whether the problem is specific to one project, to one computer or to one user. Try creating a new Coded UI test in a new Visual Studio solution to drive a simple application (eg the Windows Calculator) and see whether the generator works OK. Copy the failing project (and the whole solution) to another computer and see whether code can be generated there. Try logging in as a different user on the same computer and generating code for the same project and for different projects.

pubxml XML to change a web.config value on web deployment

Suppose I have a web.config parameter under <appSettings><add key="myParam" value="myValue"/></appSettings> and I want to modify the value for myParam depending on the publish profile I use, ie DEVELOPMENT.pubxml and TEST.pubxml for a web site deployment.
What is the most straightforward way to accomplish this? How do I specify in the pubxml which keys I want to transform, where they are, etc?
Either a direct answer or a link to a resource that answers this question would be highly appreciated.
You can create Web.config transform files for publish profiles as well as for build configurations. When you publish, either in Visual Studio or from the command line, Visual Studio applies both the appropriate build configuration transform and the publish profile transform. See this tutorial:
http://www.asp.net/web-forms/tutorials/deployment/visual-studio-web-deployment/web-config-transformations
This is one of a series of tutorials. Others in the series run through examples of creating publish profile transforms and examples of doing it from the command line.
The tutorials use a web application project. If by web site deployment you mean you're deploying a web site project, the process is basically the same as long as you have installed the latest VS update (see the first tutorial in the series for links to the VS update).

Successful deployment from Visual Studio, but Sharepoint site shows old content

My company are working at Sharepoint site that we are developing using Visual Studio. The actual installation at the customer is performed by scripts deploying the produced wsp-files. During normal development I mostly use deployment from directly from inside Visual Studio. Unfortunately I often run into problems when trying to deploy my solutions. We are using a server-farm set up, but each developer has their own virtual server, datebase instance and so on.
We have one project file that the define the basic content-type used for different department. This content-type typically define stuff like what period that the list item cover. Each department have their own project that uses the content type combined with department specific fields to form the final list.
One of my current problems is that when I make edits to the content type and deploy it the changes does not seem to propagate. Even though I rebuild the solution and deploy both the base project and the department project with success I still see the old version of the content fields when I create a new department list. Sometimes it helps to retract the projects, but often I literally have to restart everything before it works.
My question is if this problem is caused by Visual Studio not really deploying my new defintions or if there is some architectual aspect of Sharepoint 2010 that might prevent the change to propagate. What steps can I take to lessen the likelihood of the problem occuring?
Have you tried deleting the content type with Central Administration before doing a new deployment? I've found out that Sharepoint don't update/create content types when it finds other one with the same name.

How to use VS Installer class in a Custom Action

Dozens of Q&A entries (all but one in stackoverflow!) that I found got close to this question, but didn't teach me what I needed. I have what should be a nearly simple installation: a Windows service and an associated tray icon application. They install fine with the standard VS Setup project. After the files are installed, I need to present a dialog to the user to set some parameters in the service's exe.config file. In that dialog, the user should be able to abort the installation. I've tried two approaches to the Custom Action process and ran into a wall with each when it comes to making the installation roll back.
Approach 1: An exe for the Custom Action, run at Commit time.
This sort-of works. The application returns a non-zero exit code and the installation rollback occurs. What I don't like is that:
When the app exits (after the user selects to Cancel), the installation displays an error message saying that there was a problem with the installation and the user should contact the vendor. Since that's not the case, I'd prefer a more correct message ("Installation canceled by user") or no message at all.
Both of the project outputs (the service and the tray app) have to be listed under all four Custom Action sections or my dialog won't appear. Instead, an error appears about a missing InstallState file and the installation always fails. Intuitively, this seems wrong.
Approach 2: An Installer as the Custom Action, run at Install or Commit time.
This is cleaner to me (only the one item listed in the Custom Actions), but getting the process to roll back is worse than Approach 1. It seems that I have to throw an exception in the overridden method (Install/Commit), which then gives me several error dialogs before the rollback occurs, and then the rollback doesn't always uninstall the service.
What is the cleanest way to make this work without going to WiX or similar options?
The simple answer is don't use VS Installer Classes. They have a number of fundamental design flaws. I suggest you look at Windows Installer XML's ( WiX ) Deployment Tools Foundation ( DTF ) instead. DTF is a far superior hosting model / interop library for your managed code and outputs DLL's that are compatible ( from an MSI perspective ) with C/C++ custom actions. They can be consumed as Custom Actions by any MSI authoring tool, not just WiX installers.
Deployment Tools Foundation joins the WiX toolset.
Deployment Tools Foundation (DTF) Managed Custom Actions
I recommend this approach:
create a custom installation dialog which asks the user about your options
use the installer properties set by this dialog to modify your service configuration file (you can use a custom action or the XML support of another setup authoring tool)
This way the information is gathered before the install and the user can also abort the install without problems.
This approach is not supported by Visual Studio, but it can be done with free or commercial setup authoring tools.
If you want to stick with a custom action, you can try this:
make sure your custom action is deferred and doesn't run during commit (commit means that the installation was performed and there's no rollback)
use a Win32 DLL to show your custom dialog; this way you can return ERROR_INSTALL_USEREXIT (1602) so a friendlier user exit dialog is shown instead of the fatal error dialog

Resources