<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>SharePoint of Contact</title>
	<atom:link href="http://www.sharepointofcontact.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sharepointofcontact.com</link>
	<description>SharePoint Web Parts and other Solutions</description>
	<pubDate>Fri, 28 Nov 2008 14:33:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Simple Document Workflow</title>
		<link>http://www.sharepointofcontact.com/2008/08/03/simple-document-workflow/</link>
		<comments>http://www.sharepointofcontact.com/2008/08/03/simple-document-workflow/#comments</comments>
		<pubDate>Sun, 03 Aug 2008 19:29:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Workflows]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[MOSS]]></category>

		<category><![CDATA[SharePoint Extension for Visual Studio 2008]]></category>

		<category><![CDATA[SharePoint Workflows]]></category>

		<category><![CDATA[WSS]]></category>

		<guid isPermaLink="false">http://www.sharepointofcontact.com/?p=33</guid>
		<description><![CDATA[A simple SharePoint workflow to automatically move documents from one document library to another document library.]]></description>
			<content:encoded><![CDATA[<p><strong><span style="text-decoration: underline;">Using</span></strong></p>
<p><a title="Microsoft Office SharePoint Server" href="http://www.sharepointofcontact.com/2008/08/03/microsoft-office-sharepoint-server/" target="_self">MOSS 2007</a><br />
<a title="Microsoft Windows Server 2003" href="http://www.sharepointofcontact.com/2008/08/03/microsoft-windows-server-2003/" target="_self">Windows Server 2003</a><br />
<a title="Microsoft Visual Studio 2008" href="http://www.sharepointofcontact.com/2008/08/03/microsoft-visual-studio-2008/" target="_self">Visual Studio 2008</a><br />
<a title="SharePoint Extension for Visual Studio 2008" href="http://www.sharepointofcontact.com/2008/08/03/sharepoint-extensions-for-visual-studio-2008/" target="_self">SharePoint Extension for Visual Studio 2008</a></p>
<p><span style="text-decoration: underline;"><strong>Setup</strong></span></p>
<p>- In SharePoint, Set up two Document Libraries</p>
<ul>
<li> Source Document Library</li>
<li> Destination Document Library</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Instructions</strong></span></p>
<p>- VS 2008/File/New/Project/Visual C#/Office/2007/SharePoint 2007 Sequential Workflow<br />
- Name the Project<br />
- OK</p>
<p>1st New Office SharePoint Workflow Dialog<br />
- Keep name of Workflow<br />
- Enter URL of the site contianing the Document Libraries ( ie, if the URL is http://localhost/Source Document Library, use http://localhost/ )<br />
- Next</p>
<p>2nd New Office SharePoint Workflow Dialog<br />
- [checked]Keep Automatically associate workflow (default)<br />
- Library or List: Source Document Library<br />
- History list: Workflow History (default)<br />
- Taks list: Tasks (default)<br />
- Next</p>
<p>3rd New Office SharePoint Workflow Dialog - Depends on what you are trying to accomplish<br />
- [checked] Manually by others<br />
- [checked] When an item is created<br />
- [checked] When an item is changed<br />
- Finish</p>
<p>- Double-click Workflow1.cs in Solution Explorer (if not already open)<br />
- Click on onWorkflowActivated1<br />
- In Properties, give the correlation token a name (something descriptive to the workflow)<br />
- Expand CorrelationToken property. In the OwnerActivityName field, select Workflow1 from drop down. It&#8217;s Workflow1, which is the default name of the Workflow. If you change the name of your Workflow, you have to change this as well.</p>
<p>- From Toolbox, expand Windows Workflow v3.0<br />
- Drag and drop the Code element under onWorkflowActivated1<br />
- From Toolbox, expand SharePoint Workflow<br />
- Drag and drop the LogToHistoryListActivity element under codeActivity1</p>
<p>- Double-click on onWorkflowActivated1 to open up the code window<br />
- Add &#8216;public string logHistoryDescriptions;&#8217; and &#8216;public string logHistoryOutcome;&#8217; above the Workflow1 function<br />
- Add &#8216;this.workflowId = workflowProperties.WorkflowId;&#8217; in the onWorkflowActivated1_Invoked function</p>
<p>- On Workflow1.cs(Design), Double click the codeActivity1 to access the codeActivity1_ExecuteCode function<br />
- Use the following code:</p>
<p>//Copy the document, using the same file name in the destination libarary<br />
workflowProperties.Item.CopyTo(workflowProperties.Web.Url + &#8220;/&#8221; + &#8220;Destination Document Library/&#8221; + workflowProperties.Item.File.Name);</p>
<p>//log the activity<br />
this.logHistoryDescriptions = &#8220;Attempted file copy of &#8221; + workflowProperties.Item.File.Name +<br />
&#8221; &#8221; + &#8220;From: &#8221; + workflowProperties.List.Title +<br />
&#8221; &#8221; + &#8220;To Destination Document Library&#8221;;</p>
<p>this.logHistoryOutcome = &#8220;Successful&#8221;;</p>
<p>- Click logToHistoryListActivity1 from the Workflow Design view<br />
- On the properties screen, change the HistoryDescription property and the HistoryOutcome property.<br />
- Select the HistoryDescription property (put your mouse in the empty text box beside it)<br />
- Hit the ellipses control (will show up at the end of the empty text box. In the “Bind …. To an activity’s property” menu, choose logHistoryDescription which represents our internal variable (the one that we set in code).<br />
- Do the same thing for the HistoryOutcome Property, choosing the logHistoryOutcome variable</p>
<p>- Build the project</p>
<p>- May possibly get Attach Security Warning dialog, Click Attach<br />
- May get a Script Debugging Disabled dialog, Click Yes</p>
<p>- Project will open up the SharePoint site to the Source Document Library. The workflow should be automatically attached to the Source Document Library. If not, select Settings/Document Library Settings/Workflow Settings and attach the workflow.</p>
<p>∞</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sharepointofcontact.com/2008/08/03/simple-document-workflow/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Packaging and Deploying (Multiple) SharePoint Solutions</title>
		<link>http://www.sharepointofcontact.com/2008/11/28/packaging-and-deploying-sharepoint-multiple-solutions/</link>
		<comments>http://www.sharepointofcontact.com/2008/11/28/packaging-and-deploying-sharepoint-multiple-solutions/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 12:06:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Deployment]]></category>

		<category><![CDATA[Add new tag]]></category>

		<category><![CDATA[SharePoint]]></category>

		<category><![CDATA[SharePoint Deployment]]></category>

		<category><![CDATA[visual studio 2005]]></category>

		<category><![CDATA[web parts]]></category>

		<category><![CDATA[wspbuilder]]></category>

		<guid isPermaLink="false">http://www.sharepointofcontact.com/?p=40</guid>
		<description><![CDATA[How to package and deploy SharePoint solutions including the packaging of several solutions into one solution package.]]></description>
			<content:encoded><![CDATA[<p>The following are instructions to create a SharePoint solution package for server deployment.  Perhaps more importantly, this method can be used to package several SharePoint components into one solution package which can be installed on a server where Visual Studio is not installed (or allowed).  For the purposes of these instructions, I&#8217;ve chosen to use web parts for packaging.  However, other solutions such as event handlers and timer jobs can be treated in much the same way.</p>
<p>*These instructions assume you know how to create and deploy web parts using Visual Studio 2005 with SharePoint extensions.</p>
<p><span style="text-decoration: underline;"><strong>Tools</strong></span></p>
<p><a title="Trial Download of Visual Studio 2005" href="http://www.microsoft.com/emea/msdn/visualstudio/enxu/getthetrials/" target="_blank">Visual Studio 2005</a><br />
<a title="SharePoint Extensions for Visual Studio 2005" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=3E1DCCCD-1CCA-433A-BB4D-97B96BF7AB63&amp;displaylang=en" target="_blank">SharePoint Extensions for Visual Studio 2005</a><br />
<a title="Download WSPBuilder" href="http://www.codeplex.com/wspbuilder" target="_blank">WSPBuilder</a><br />
STSADM Tool (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN) located on SharePoint Server with default installation</p>
<p><span style="text-decoration: underline;"><strong>Set Up WSPBuilder</strong></span></p>
<p>1. <a title="Download WSPBuilder" href="http://www.codeplex.com/wspbuilder" target="_blank">Download WSPBuilder</a> if you haven&#8217;t already<br />
2. Extract contents of zip file<br />
3. Create a directory with the name you want for your master solution package<br />
4. Move the following files from the extracted WSPBuilder directory to the master solution package directory:<br />
&nbsp;- WSPBuilder.exe<br />
&nbsp;- Mono.Cecil.dll<br />
&nbsp;- CabLib.dll<br />
&nbsp;- WSPBuilder.exe.config<br />
5. For web part features, create a directory named GAC and a directory named 12 directly under the master solution package directory<br />
6. Under the 12 directory, create a directory named TEMPLATE and a directory named FEATURES</p>
<p>The entire master solution structure at this point will look like this:</p>
<p>&lt;Master Solution Package Name&gt;<br />
&nbsp;&nbsp;&lt;WSPBuilder.exe&gt;<br />
&nbsp;&nbsp;&lt;Mono.Cecil.dll&gt;<br />
&nbsp;&nbsp;&lt;CabLib.dll&gt;<br />
&nbsp;&nbsp;&lt;WSPBuilder.exe.config&gt;<br />
&nbsp;&nbsp;&lt;GAC&gt;<br />
&nbsp;&nbsp;&lt;12&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;TEMPLATE&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;FEATURES&gt;</p>
<p><span style="text-decoration: underline;"><strong>Create Web Part Solution Directories</strong></span></p>
<p>1. Open the Visual Studio web part solution<br />
2. Deploy the web part solution to your<em> development </em>SharePoint Server<br />
3. Repeat for all web part solutions you want to be included in the master solution package</p>
<p>*The reason the web parts need to be deployed on your development SharePoint server is because it&#8217;s the only way to easily get the proper solution files needed for WSPBuilder.  It is possible to manually build these XML files but it&#8217;s much easier this way.  This only needs to be done once for each web part.  After the master solution package is built, you can simply update the .dll files in the GAC directory in your master solution package, rebuild and redeploy.  Details about this are in the steps below.</p>
<p><span style="text-decoration: underline;"><strong>Remove Web Parts From the Development SharePoint Server</strong></span></p>
<p>The steps in this section are optional if you choose <em>not </em>to test your master solution package on your development SharePoint server before deployment in the production environment.  It may not be a good idea to attempt this but it&#8217;s ultimately a matter of personal preference.</p>
<p>1. Deactivate Feature: stsadm -o deactivatefeature -name &lt;webpartname&gt; -url &lt;site&gt; -force<br />
2. Uninstall Feature: stsadm -o uninstallfeature -name &lt;webpartname&gt; -force<br />
3. Retract Solution: stsadm -o retractsolution -name &lt;webpartname&gt;.wsp -local -url &lt;site&gt;<br />
4. Delete Solution: stsadm -o deletesolution -name &lt;webpartname&gt;.wsp<br />
5. Repeat for all web part solutions you want to be included in the master solution package and were previously deployed</p>
<p><span style="text-decoration: underline;"><strong>Add Web Part Solution Directories to Master Solution Package</strong></span></p>
<p>1. Browse to the Visual Studio web part solution directory in Windows<br />
2. Copy the directory &lt;webpartname&gt; located at bin/Debug/solution/ to &lt;WSP Package Name&gt;/12/TEMPLATE/FEATURES/<br />
3. Copy the &lt;webpartname&gt;.dll from bin/Debug/solution/ to the &lt;WSP Package Name&gt;/GAC/<br />
4. Repeat for all web part solutions you want to be included in the master solution package</p>
<p>The entire structure including a single web part feature will look like this:</p>
<p>&lt;MasterSolutionPackageName&gt;<br />
&nbsp;&nbsp;&lt;WSPBuilder.exe&gt;<br />
&nbsp;&nbsp;&lt;Mono.Cecil.dll&gt;<br />
&nbsp;&nbsp;&lt;CabLib.dll&gt;<br />
&nbsp;&nbsp;&lt;WSPBuilder.exe.config&gt;<br />
&nbsp;&nbsp;&lt;GAC&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;webpartname.dll&gt;<br />
&nbsp;&nbsp;&lt;12&gt;<br />
&nbsp;&nbsp;&lt;TEMPLATE&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;FEATURES&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;webpartname directory&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;feature.xml&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;webpartname directory&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;webpartname.webpart&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;webpartname.xml&gt;</p>
<p>*It&#8217;s <em>highly</em> recommended that you take all files from the solution folder in each Visual Studio web part project for the initial build of master solution package, even though other copies of the files are available throughout the web part project.</p>
<p><span style="text-decoration: underline;"><strong>Build Master Solution Package</strong></span></p>
<p>1. Run WSPBuilder.exe in master solution directory.  It will produce two files, solutionid.txt and &lt;mastersolutionpackagename&gt;.wsp in the master solution directory.  The &lt;mastersolutionpackagename&gt;.wsp file is only file you&#8217;ll need.  It contains all of the XML files for each web part you chose to package as well as their associated .dll files.</p>
<p><span style="text-decoration: underline;"><strong>Deploy Master Solution Package</strong></span></p>
<p>As mentioned above, you may want to test this deployment on your development SharePoint server prior to attempting installation in the production environment.</p>
<p>1. Add Solution: stsadm -o addsolution -filename &lt;C:/path/to/solution/&lt;mastersolutionpackagename&gt;.wsp&gt;<br />
2. Deploy Solution: stsadm -o deploysolution -name &lt;mastersolutionpackagename&gt;.wsp -url &lt;siteurl&gt; -local -allowgacdeployment</p>
<p>*When using the STSADM tool, file paths must not have spaces in them.  So it&#8217;s best to put solutions on the root of C: or somewhere close.</p>
<p><span style="text-decoration: underline;"><strong>Activate Features Contained in Master Solution Package</strong></span></p>
<p>Even though the master solution package is a single file, each web part contained within it needs to be activated as a feature on the SharePoint server.  Make sure you are activating the web part features that are in the master solution package and not the master solution package itself.  The activation of these features will only need to be done once unless, of course, they are deactivated.</p>
<p>1. Activate Feature: stsadm -o activatefeature -name &lt;webpartname&gt; -url &lt;siteurl&gt; -force<br />
2. Repeat for all web part solutions included in the master solution package</p>
<p><span style="text-decoration: underline;"><strong>Update Solution Package</strong></span></p>
<p>As mentioned previously, the master solution package can be easily updated with new web parts or newer versions of web parts already contained within it.   To add new web parts, you&#8217;ll need add the solution directory for that web part to the package (steps above).  To update pre-existing web parts you only need to build your Visual Studio web part project, then copy the &lt;webpartname&gt;.dll file from the Debug directory of that project to the GAC directory of the master solution package.  Whether adding or updated a web part, you will need to run the WSPBuilder.exe file located at the root of your master solution package so that the changes are included in your final .wsp solution package file.</p>
<p><span style="text-decoration: underline;"><strong>Delete Solution Package (should you need to)</strong></span></p>
<p>stsadm -o retractsolution -name &lt;solutionname&gt;.wsp -url &lt;siteurl&gt; -local<br />
stsadm -o deletesolution -name &lt;solutionname&gt;.wsp</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sharepointofcontact.com/2008/11/28/packaging-and-deploying-sharepoint-multiple-solutions/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
