<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>SharePoint</title>
        <link>http://geekswithblogs.net/Podwysocki/category/4453.aspx</link>
        <description>SharePoint</description>
        <language>en-US</language>
        <copyright>Matthew Podwysocki</copyright>
        <managingEditor>matthew.podwysocki@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Model View Presenter (MVP) Passive View, SharePoint and Mocking</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2007/12/20/117881.aspx</link>
            <description>For the past couple of years, the Model View Presenter pattern has gotten a lot of attention on the .NET platform and more in particular to ASP.NET.  For a thorough introduction on MVP with ASP.NET, read the article on &lt;a href="http://www.codeproject.com/KB/architecture/ModelViewPresenter.aspx"&gt;CodeProject &lt;/a&gt;by Billy McCafferty.&lt;br /&gt;
&lt;br /&gt;
Recently, it has come to play that many now favor the Model View Controller (MVC) pattern over MVP.  If you're confused about the differences between the two, check out this &lt;a href="http://blog.vuscode.com/malovicn/archive/2007/12/18/model-view-presenter-mvp-vs-model-view-controller-mvc.aspx"&gt;post&lt;/a&gt; which will explain it well.  The basic gist is that the MVP pattern gives you the ability to mock the view whereas the MVC pattern allows for the mocking of the entire flow, including the context, request and response.  To me, that's a bit of overkill right now for what I need with SharePoint, especially when dealing with Web Parts.&lt;br /&gt;
&lt;br /&gt;
Now the term Model View Presenter (MVP) itself has been &lt;a href="http://martinfowler.com/eaaDev/ModelViewPresenter.html"&gt;retired now for a year&lt;/a&gt; by Martin Fowler and split into two new patterns.  It has been split into two parts:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://martinfowler.com/eaaDev/SupervisingPresenter.html"&gt;The Supervising Controller&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://martinfowler.com/eaaDev/PassiveScreen.html"&gt;The Passive View&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
So, what's the difference between the two and which to pick?&lt;br /&gt;
&lt;br style="font-weight: bold;" /&gt;
&lt;span style="font-weight: bold;"&gt;The Supervising Controller&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The Supervising Controller uses a controller to both handle the input response but also manipulate the view to handle the complex view logic.  The view is left to simple behavior, only intervening when it cannot be done in the controller.  The presentation functionality is split into two parts, the presenter and the view.  The model is separate for this design pattern.  &lt;br /&gt;
&lt;br /&gt;
The Supervising Controller has two main responsibilities:  input response and view/model synchronization.  For input response, the controller operates in the presenter style.  All actions on the screen are handed off to the presenter which in turn handles all the logic.  For the view/model synchronization, the controller relegates much of that functionality to the view.  The view uses the typical data binding for populating the data fields.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;The Passive View&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The Passive View reduces the behavior of the UI components to a minimum by using a controller/presenter that not only handles the responses to events, but also handles the updating of the view.  This allows for easier testing to be focused mostly on the controller/presenter and not as much on the view.&lt;br /&gt;
&lt;br /&gt;
With this pattern, the user interface is split into two parts, the view that handles the display and the controller that responds to user actons.  The change from the typical MVP pattern is that the view is completely passive and no longer responsible for updating itself from the model.  All of the view logic is contained in the controller/presenter and there is no dependency in either direction between the view and the model.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Moving Into SharePoint&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
There are two different ways to approach this problem as noted above, either the Supervising Controller or the Passive View.  For this post, let's go with the Passive View approach.  In this example, I will be creating a random quote generator web part part .  So, let's define the view first.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 255);"&gt;public interface&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;IRandomQuoteView&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
     &lt;span style="color: rgb(51, 153, 102);"&gt;// Quote related fields&lt;/span&gt;&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;string &lt;/span&gt;QuoteCategory { &lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;; }&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;string &lt;/span&gt;Quote { &lt;span style="color: rgb(0, 0, 255);"&gt;set&lt;/span&gt;; }&lt;br /&gt;
     &lt;br /&gt;
     &lt;span style="color: rgb(51, 153, 102);"&gt;// Status message for errors&lt;/span&gt;&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;string &lt;/span&gt;StatusMessage { &lt;span style="color: rgb(0, 0, 255);"&gt;set&lt;/span&gt;; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
As defined above, we need to get the values in our presenter from the view for our random quote generator  The presenter is responsible for setting the StatusMessage which indicates whether it passed or failed validation as well as the quote itself.  Pretty simple, eh?  Now let's go ahead and define the presenter.  Remember that we need to connect to a business layer/data layer and will have dependency injection for loose coupling and separation of concerns.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 255);"&gt;public class&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;RandomQuotePresenter&lt;/span&gt;&lt;br /&gt;
{&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;private readonly&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;IQuoteService &lt;/span&gt;quoteService;&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;private readonly&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;IRandomQuoteView&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; &lt;/span&gt;quoteView;&lt;br /&gt;
&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public &lt;/span&gt;RandomQuotePresenter(&lt;span style="color: rgb(0, 128, 128);"&gt;IRandomQuoteView&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; &lt;/span&gt;quoteView) : &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;(quoteView, &lt;span style="color: rgb(0, 0, 255);"&gt;new &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;SharePointQuoteService&lt;/span&gt;()) {}&lt;br /&gt;
&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public &lt;/span&gt;RandomQuotePresenter(&lt;span style="color: rgb(0, 128, 128);"&gt;IRandomQuoteView&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; &lt;/span&gt;quoteView, &lt;span style="color: rgb(0, 128, 128);"&gt;IQuoteService &lt;/span&gt;quoteService)&lt;br /&gt;
     {&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.quoteView = quoteView;&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.quoteService = quoteService;&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public void &lt;/span&gt;InitView()&lt;br /&gt;
     {&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;.IsNullOrEmpty(quoteView.QuoteCategory))&lt;br /&gt;
          {&lt;br /&gt;
               quoteView.StatusMessage = &lt;span style="color: rgb(51, 153, 102);"&gt;"Category required"&lt;/span&gt;;&lt;br /&gt;
               &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;;&lt;br /&gt;
          }&lt;br /&gt;
&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;try&lt;/span&gt;&lt;br /&gt;
          {&lt;br /&gt;
               quoteView.Quote = quoteService.GetRandomQuote(quoteView.QuoteCategory);&lt;br /&gt;
&lt;br /&gt;
               &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;.IsNullOrEmpty(quoteView.Quote))&lt;br /&gt;
                    quoteView.StatusMessage = &lt;span style="color: rgb(51, 153, 102);"&gt;"No Quote Found..."&lt;/span&gt;;&lt;br /&gt;
          }&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;catch&lt;/span&gt;(&lt;span style="color: rgb(0, 128, 128);"&gt;QuoteServiceException&lt;/span&gt;)&lt;br /&gt;
          {&lt;br /&gt;
               quoteView.StatusMessage = &lt;span style="color: rgb(51, 153, 102);"&gt;"Data error";&lt;/span&gt;&lt;br /&gt;
          }&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Ok, now that we have the presenter created, let's start testing.  Well, actually I should have stubbed everything out first and then made it fail, then make it pass, but let's continue.  Let's do some unit testing on this piece.  I'll be using Rhino Mocks as always to do my mocking.&lt;br /&gt;
&lt;br /&gt;
[&lt;span style="color: rgb(0, 128, 128);"&gt;Test&lt;/span&gt;]&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 255);"&gt;public void&lt;/span&gt; NullQuoteCategoryShouldCauseCategoryRequiredMessage()&lt;br /&gt;
{&lt;br /&gt;
     &lt;span style="color: rgb(0, 128, 128);"&gt;MockRepository &lt;/span&gt;repository = new MockRepository();&lt;br /&gt;
     &lt;span style="color: rgb(0, 128, 128);"&gt;IQuoteService &lt;/span&gt;service = repository.CreateMock&amp;lt;&lt;span style="color: rgb(0, 128, 128);"&gt;IQuoteService&lt;/span&gt;&amp;gt;();&lt;br /&gt;
     &lt;span style="color: rgb(0, 128, 128);"&gt;IRandomQuoteView&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; &lt;/span&gt;view = repository.CreateMock&amp;lt;&lt;span style="color: rgb(0, 128, 128);"&gt;IRandomQuoteView&lt;/span&gt;&amp;gt;();&lt;br /&gt;
     &lt;span style="color: rgb(0, 128, 128);"&gt;Expect&lt;/span&gt;.Call(view.QuoteCategory).Return(null);&lt;br /&gt;
     view.StatusMessage = &lt;span style="color: rgb(51, 153, 102);"&gt;"Category required"&lt;/span&gt;;&lt;br /&gt;
     &lt;span style="color: rgb(0, 128, 128);"&gt;RandomQuotePresenter &lt;/span&gt;presenter = &lt;span style="color: rgb(0, 0, 255);"&gt;new &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;RandomQuotePresenter&lt;span style="color: rgb(0, 0, 0);"&gt;(view, service);&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt;      repository.ReplayAll();&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt;      presenter.InitView();&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt;      repository.VerifyAll();&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; }&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; Well, that was easy, and we didn't even need a UI to do it.  Well, now let's bring SharePoint web parts into the game.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
[&lt;span style="color: rgb(0, 128, 128);"&gt;Guid&lt;/span&gt;(&lt;span style="color: rgb(51, 153, 102);"&gt;"357b9668-0f88-4bcb-87a2-c34cc6694e90"&lt;/span&gt;)]&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 255);"&gt;public class&lt;/span&gt; &lt;span style="color: rgb(0, 128, 128);"&gt;RandomQuoteWebPart &lt;/span&gt;: &lt;span style="color: rgb(0, 128, 128);"&gt;WebPart&lt;/span&gt;, &lt;span style="color: rgb(0, 128, 128);"&gt;IQuoteOfTheDayView&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;
{&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;private &lt;/span&gt;&lt;/span&gt;RandomQuotePresenter&lt;span style="color: rgb(0, 128, 128);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;presenter;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: rgb(0, 128, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;private string&lt;/span&gt; quoteCategory;&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;private string&lt;/span&gt; quote;&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;private string&lt;/span&gt; statusMessage;&lt;br /&gt;
&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public string&lt;/span&gt; QuoteCategory { &lt;span style="color: rgb(0, 0, 255);"&gt;get &lt;/span&gt;{ &lt;span style="color: rgb(0, 0, 255);"&gt;return &lt;/span&gt;quoteCategory; } }&lt;br /&gt;
&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public string&lt;/span&gt; StatusMessage { &lt;span style="color: rgb(0, 0, 255);"&gt;set &lt;/span&gt;{ statusMessage = &lt;span style="color: rgb(0, 0, 255);"&gt;value&lt;/span&gt;; } }&lt;br /&gt;
&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public string&lt;/span&gt; Quote { &lt;span style="color: rgb(0, 0, 255);"&gt;set &lt;/span&gt;{ quote = &lt;span style="color: rgb(0, 0, 255);"&gt;value&lt;/span&gt;; } }&lt;br /&gt;
&lt;br /&gt;
     [&lt;span style="color: rgb(0, 128, 128);"&gt;WebBrowsable&lt;/span&gt;, &lt;span style="color: rgb(0, 128, 128);"&gt;Personalizable&lt;/span&gt;]&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;public string&lt;/span&gt; QuoteCategoryType&lt;br /&gt;
     {&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;get &lt;/span&gt;{ &lt;span style="color: rgb(0, 0, 255);"&gt;return &lt;/span&gt;quoteCategory; }&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;set &lt;/span&gt;{ quoteCategory = &lt;span style="color: rgb(0, 0, 255);"&gt;value&lt;/span&gt;; }&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;protected override void &lt;/span&gt;OnLoad(&lt;span style="color: rgb(0, 128, 128);"&gt;EventArgs &lt;/span&gt;e)&lt;br /&gt;
     {&lt;br /&gt;
          presenter = &lt;span style="color: rgb(0, 0, 255);"&gt;new &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;RandomQuotePresenter&lt;/span&gt;(&lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;);&lt;br /&gt;
          presenter.InitView();&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     &lt;span style="color: rgb(0, 0, 255);"&gt;protected override void&lt;/span&gt; Render(&lt;span style="color: rgb(0, 128, 128);"&gt;HtmlTextWriter &lt;/span&gt;writer)&lt;br /&gt;
     {&lt;br /&gt;
          writer.write(&lt;span style="color: rgb(51, 153, 102);"&gt;"Quote Category: "&lt;/span&gt; + quoteCategory + &lt;span style="color: rgb(51, 153, 102);"&gt;"&amp;lt;br/&amp;gt;"&lt;/span&gt;);&lt;br /&gt;
          writer.write(&lt;span style="color: rgb(51, 153, 102);"&gt;"Quote: "&lt;/span&gt; + quote + &lt;span style="color: rgb(51, 153, 102);"&gt;"&amp;lt;br/&amp;gt;"&lt;/span&gt;);&lt;br /&gt;
          &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;(!&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;.IsNullOrEmpty(statusMessage))&lt;br /&gt;
               writer.write(&lt;span style="color: rgb(51, 153, 102);"&gt;"Status Message: "&lt;/span&gt; + statusMessage);&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Sure, I'm simplifying it a bit, but you get the general idea.  I'm persisting the QuoteCategory as something configurable through a web part.  The rest comes as natural as a standard web part on how to render.  The OnLoad is where the magic happens with talking to the presenter to set up the view.  Pretty cool, huh?  The key is to keep your view as simple as possible and let the presenter do the work for you.&lt;br /&gt;
&lt;br /&gt;
So, is that all that's to it?  Well, not really...  As you may have noted, my data service really comes from SharePoint, and moreover, a SharePoint list.  Let's talk about that now...&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;Mocking Out SharePoint&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
As most web developers know, unit tests can be hard for web applications that have dependencies on such things as the HttpContext, etc.  Well, in the SharePoint world, it's no different.  So, what options do we have to stub out, say the SPContext, SPList and so on so that we're not tightly coupled to the API for our unit tests?  It's not super easy due to the fact that there are static members, so interfaces won't suffice there.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; We have the following options:&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;ul style="color: rgb(0, 0, 0);"&gt;
    &lt;li&gt;Write interfaces and wrappers for each SharePoint object&lt;/li&gt;
    &lt;li&gt;Use Duck Typing to create the interfaces and cast the SharePoint objects to them&lt;/li&gt;
    &lt;li&gt;Use TypeMock.NET to create a recorder and play back&lt;/li&gt;
    &lt;li&gt;Use Reflector Add-in Doubler to create our test doubles&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; Let's look at each one.&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="font-weight: bold; color: rgb(0, 0, 0);" /&gt;
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Wrap each object&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; In the worst case scenario, you can write all the interfaces for all the classes you wish to mock and create doubles for each by hand.  This includes defining the interface for SPContext, SPList, SPWeb, SPSite and the actual implementations.  This is not hard, but time consuming and prone to error when dealing with this much code.  Not the ideal situation&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Duck Typing&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;a href="http://en.wikipedia.org/wiki/Duck_typing" style="color: rgb(0, 0, 0);"&gt;Duck Typing&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; itself is not a new concept.  This allows you to infer the functionality through interfaces.  Duck Typing is available for .NET through the &lt;/span&gt;&lt;a href="http://www.deftflux.net/blog/page/Duck-Typing-Project.aspx" style="color: rgb(0, 0, 0);"&gt;Duck Typing Project&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.  This is more apt for dynamic languages such as Ruby, but let's give it a try here for a SharePoint object.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;interface &lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;ISPField&lt;/span&gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; {&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt;      &lt;span style="color: rgb(0, 0, 255);"&gt;object &lt;/span&gt;GetFieldValue(&lt;span style="color: rgb(0, 0, 255);"&gt;string &lt;/span&gt;value);&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt;      &lt;span style="color: rgb(0, 0, 255);"&gt;object &lt;/span&gt;GetFieldValueAsHtml(&lt;span style="color: rgb(0, 0, 255);"&gt;object &lt;/span&gt;value);&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt;      &lt;span style="color: rgb(51, 153, 102);"&gt;// And so on&lt;/span&gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; }&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public void&lt;/span&gt; ConsumeField&lt;span style="color: rgb(0, 128, 128);"&gt;(ISPField &lt;/span&gt;field)&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; {&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt;      ...&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; }&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; And in my calling code:&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;SPField &lt;/span&gt;field = &lt;span style="color: rgb(51, 153, 102);"&gt;// Get field&lt;/span&gt;&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;ISPField &lt;/span&gt;iField = &lt;span style="color: rgb(0, 128, 128);"&gt;DuckTyping&lt;/span&gt;.Cast&amp;lt;&lt;span style="color: rgb(0, 128, 128);"&gt;ISPField&lt;/span&gt;&amp;gt;(field);&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; ConsumeField(iField);&lt;br /&gt;
&lt;br /&gt;
Phil Haack has more on the subject &lt;a href="http://haacked.com/archive/2007/08/19/why-duck-typing-matters-to-c-developers.aspx"&gt;here&lt;/a&gt;.&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;/span&gt; &lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;TypeMock.NET&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; Rhino Mocks has a limitation, as do most mocking frameworks of only being able to mock interfaces and abstract classes.  Well, SharePoint has that limitation due to all classes being concrete and/or sealed.  Enter &lt;/span&gt;&lt;a href="http://www.typemock.com/" style="color: rgb(0, 0, 0);"&gt;TypeMock.NET &lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;which allows you to record just about any object in the .NET Framework just as if it were the real thing.  This allows for mocking of even static members which is something that the others cannot do.  Of course this product comes with a price tag, depending on your organization.  Another point to make is that it really isn't "abstracting" away your dependencies at all, it's just masking them.  I've seen pluses and minuses about it and I just haven't made up my mind yet.&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; In order to do some mocking, there are some good samples out there including this one on &lt;/span&gt;&lt;a href="http://mcmsfaq.com/cs2/blogs/adrian_spear/archive/2006/05/25/138.aspx" style="color: rgb(0, 0, 0);"&gt;HttpContext using TypeMock.NET&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Doubler&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; Now let's look at the final one.  &lt;/span&gt;&lt;a href="http://code.google.com/p/doubler/" style="color: rgb(0, 0, 0);"&gt;Doubler&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; is a &lt;/span&gt;&lt;a href="http://www.aisto.com/roeder/dotnet/" style="color: rgb(0, 0, 0);"&gt;.NET Reflector &lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Add-in developed by &lt;/span&gt;&lt;a href="http://jayflowers.com/" style="color: rgb(0, 0, 0);"&gt;Jay Flowers&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.  The intent of this add-in is to generate code for unit tests, wrappers and stubs.  &lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; Install this add-in and simply right-click on any class and you get the following options:&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;ul style="color: rgb(0, 0, 0);"&gt;
    &lt;li&gt;Recording Generator&lt;/li&gt;
    &lt;li&gt;Wrapper/Interface Generator&lt;/li&gt;
    &lt;li&gt;Test Generator&lt;/li&gt;
    &lt;li&gt;Fake Generator&lt;/li&gt;
    &lt;li&gt;Call Graph&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; Pretty cool stuff and it just works.  This is a highly recommended product for generating your stubs.&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Wrapup&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; Well, this has been a pretty long post on doing development with SharePoint and I hope it helps.  There are many hurdles to overcome for doing good design and testing with SharePoint, but I hope this leads in the right direction.&lt;br /&gt;
&lt;br /&gt;
Where do we go from here?  Well, we can start looking at IoC containers for our dependency injection for our presenter, we can look at using the Supervising Controller and so on.  Plenty of opportunities to explore!&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;/span&gt; &lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;span style="color: rgb(0, 0, 0);"&gt; Develop, mentor and inspire!&lt;/span&gt;&lt;br style="color: rgb(0, 0, 0);" /&gt;
&lt;br /&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http://geekswithblogs.net/Podwysocki/archive/2007/12/20/117881.aspx"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://geekswithblogs.net/Podwysocki/archive/2007/12/20/117881.aspx" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117881"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117881" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/117881.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2007/12/20/117881.aspx</guid>
            <pubDate>Thu, 20 Dec 2007 18:11:59 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/117881.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2007/12/20/117881.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/117881.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/117881.aspx</trackback:ping>
        </item>
        <item>
            <title>Visual Studio 2008 and SharePoint 2007 Templates</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2007/12/13/117685.aspx</link>
            <description>With the recent announcement of &lt;a href="http://blogs.msdn.com/sharepoint/archive/2007/12/11/announcing-the-release-of-wss-3-0-sp1-and-office-sharepoint-server-2007-sp1.aspx"&gt;WSS/MOSS SP1&lt;/a&gt; and AJAX support, I decided to relook at the Visual Studio 2008 integration again.  Sure enough I was surprised to find that &lt;a href="http://weblogs.asp.net/jan/"&gt;Jan Tielens&lt;/a&gt; has been working on making it easy once again to develop web parts using templates.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.codeplex.com/smarttemplates"&gt;Smart Templates&lt;/a&gt; has been put up on CodePlex in order to create more SharePoint project types than are currently available.  This includes only Web Parts at the current time.  &lt;br /&gt;
&lt;br /&gt;
The web part template allows you to do the following:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;Create web part code&lt;/li&gt;
    &lt;li&gt;Generate the WSP&lt;/li&gt;
    &lt;li&gt;Generate Setup project for deployment&lt;/li&gt;
&lt;/ul&gt;
Future plans include:&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;Event Handler&lt;/li&gt;
    &lt;li&gt;Smart Parts (User Controls Web Parts)&lt;/li&gt;
    &lt;li&gt;Application Page Project&lt;/li&gt;
&lt;/ul&gt;
It's been a savior as one of the things holding me back from Visual Studio 2008 was SharePoint templates.  Now if they can hurry up on BizTalk...&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117685"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117685" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/117685.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2007/12/13/117685.aspx</guid>
            <pubDate>Thu, 13 Dec 2007 21:47:43 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/117685.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2007/12/13/117685.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/117685.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/117685.aspx</trackback:ping>
        </item>
        <item>
            <title>Forms Server 2007 Presentation Wrapup</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2007/11/27/117168.aspx</link>
            <description>&lt;a href="http://blah.winsmarts.com"&gt;Sahil Malik&lt;/a&gt; gave a great presentation tonight at the &lt;a href="http://caparea.net/"&gt;CapArea.NET&lt;/a&gt; user group meeting tonight.  From this discussion he covered quite a few things that involved InfoPath, Forms Server and WF for SharePoint.  A lot of the interesting tidbits discussed are available on his blog.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://blah.winsmarts.com/2006-12-InfoPath_2007__Customizing_the_default_Document_Information_Panel.aspx"&gt;Customizing the default Document Information Panel&lt;/a&gt; in which he populates the document properties by using a custom InfoPath form.&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://blah.winsmarts.com/2007-8-Writing_SharePoint_Workflows_in_VS2005_-_Crawl_Walk_Run.aspx"&gt;Writing SharePoint Workflows in Visual Studio 2005&lt;/a&gt; covers the basic WF scenarios in SharePoint, but also the custom InfoPath solutions you can introduce&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://blah.winsmarts.com/2007-8-Aggregating_multiple_data_sources_in_a_browser_based_InfoPath_2007_form.aspx"&gt;Aggregating multiple data sources in a Forms Server Form&lt;/a&gt; covers a scenario in which you can load data from a SQL Server Database and store the custom information in a SharePoint list.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
As someone who has recently taught a small course on Forms Server 2007, I found this material quite useful in extending and going a little further and deeper on the subject.&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117168"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117168" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/117168.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2007/11/27/117168.aspx</guid>
            <pubDate>Wed, 28 Nov 2007 04:59:23 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/117168.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2007/11/27/117168.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/117168.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/117168.aspx</trackback:ping>
        </item>
        <item>
            <title>SharePoint Tips and Tricks - Traverse and Fix All My Sites Document Library</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2006/06/19/82401.aspx</link>
            <description>&lt;DIV&gt;Recently, for a very large customer, I had to fix some issues with regards to SharePoint My Site lists.&amp;nbsp; Destroying and recreating each person's My Site was not an option.&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This scenario actually happened due to the fact that should you get the dreaded SPException which indicates a "Save Conflict" while updating a SPList object, it will wipe out some of your properties.&amp;nbsp; I will show an example in code in a Console Application.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;So, let's start with the Main method:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;[STAThread]&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color=#0000ff&gt;static void&lt;/FONT&gt; Main(&lt;FONT color=#0000ff&gt;string&lt;/FONT&gt;[] args)&lt;/DIV&gt;
&lt;DIV&gt;{&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Create TopologyManager&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; topologyManager = &lt;FONT color=#0000ff&gt;new &lt;/FONT&gt;TopologyManager();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; site = topologyManager.PortalSites[new Uri("http://myspsserver/")];&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; context = PortalApplication.GetContext(site);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; userProfileManager = &lt;FONT color=#0000ff&gt;new &lt;/FONT&gt;UserProfileManager(context);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Iterate through users&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;long &lt;/FONT&gt;userCount = userProfileManager.Count;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IEnumerator profileEnumerator = userProfileManager.GetEnumerator();&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;while&lt;/FONT&gt;(profileEnumerator.Next())&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Set user profile&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UserProfile userProfile = profileEnumerator.Current &lt;FONT color=#0000ff&gt;as &lt;/FONT&gt;UserProfile;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Check for personal site&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;if&lt;/FONT&gt;(userProfile.PersonalSite != &lt;FONT color=#0000ff&gt;null&lt;/FONT&gt;)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Create Personal Library&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CreatePersonalDocumentLibrary(userProfile);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Reset QuickLaunch and other properties&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ResetProperties(userProfile);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;FONT color=#008000&gt;//&amp;nbsp;if - userProfile&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;FONT color=#008000&gt;// while - profileEnumerator&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;} &lt;FONT color=#008000&gt;// method - Main&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Well, this code looks relatively simple.&amp;nbsp; First, we create the Topology, and from there we eventually get to the UserProfileManager.&amp;nbsp; From the UserProfileManager, we can get all the users for our particular Portal that we are interested in.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I then grab the IEnumeratorfrom the UserProfileManager so that I can iterate over the users.&amp;nbsp; Once I am in the while loop, I need to check whether the Personal Site exists, because there is no need to fix a site that doesn't exist.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Now, let's get back to the issue at hand.&amp;nbsp; We'll go to the place that gave me much heartache when dealing with the ever popular "Save Conflict".&amp;nbsp; Apparently, the SharePoint API does not take too kindly to having the Default View deleted and recreated.&amp;nbsp; This is unfortunate, because from my experience, you cannot modify the default view and you must delete and recreate it instead.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color=#0000ff&gt;private static void&lt;/FONT&gt; CreatePersonalDocumentLibrary(UserProfile userProfile)&lt;BR&gt;{&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;private string&lt;/FONT&gt; listName = "MyLibrary";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;private string&lt;/FONT&gt; listDescription = "My Library Description";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Set personal site&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;using&lt;/FONT&gt;(SPSite personalSite = userProfile.PersonalSite)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Allow unsafe updates&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; personalSite.AllowUnsafeUpdates = &lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Set rootweb&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;using&lt;/FONT&gt;(SPWeb rootWeb = personalSite.RootWeb)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Allow unsafe updates&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rootWeb.AllowUnsafeUpdates = &lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Create document library&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rootWeb.Lists.Add(listName, listDescription, SPListTemplateType.DocumentLibrary);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rootWeb.Update();&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Add document library to Quick Launch and enable versioning&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPList localList = rootWeb.Lists[listName];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; localList.OnQuickLaunch = &lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; localList.EnableVersioning = &lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; localList.Update();&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Add document library to Quick Launch and enable versioning&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPList createdList = rootWeb.Lists[listName];&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Add custom fields&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; createdList.Fields.Add("MyDocID", SPFieldType.Text, &lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; createdList.Fields.Add("MyDocDescription", SPFieldType.Note, &lt;FONT color=#0000ff&gt;false&lt;/FONT&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Create new view columns&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;StringCollection viewFieldCollection = &lt;FONT color=#0000ff&gt;new &lt;/FONT&gt;StringCollection();&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Add field to collection&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; viewFieldCollection.Add("DocIcon");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; viewFieldCollection.Add("LinkFilename");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; viewFieldCollection.Add("MyDocID");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; viewFieldCollection.Add("MyDocDescription");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; viewFieldCollection.Add("Last_x0020_Modified");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; viewFieldCollection.Add("Modified_x0020_By");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; viewFieldCollection.Add("LinkCheckedOutTitle");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Create default view query&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string defaultQuery = "&amp;lt;OrderBy&amp;gt;&amp;lt;FieldRef Name=\"FileLeafRef\" /&amp;gt;&amp;lt;/OrderBy&amp;gt;";&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Get default view information and delete&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Guid oldViewId = createdList.DefaultView.ID;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; createdList.Views.Delete(oldViewId);&lt;BR&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Add view as default&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; createdList.Views.Add("All Items", viewFieldCollection, defaultQuery, 1000, &lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;, &lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; createdList.DefaultView.Update();&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;try&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Try calling update&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; createdList.Update();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;FONT color=#008000&gt;// try&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;catch&lt;/FONT&gt;(SPException sp) {} &lt;FONT color=#008000&gt;// Do Nothing&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Close and dispose personalSite&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rootWeb.Close();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;} // using - rootWeb&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; personalSite.Close();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;FONT color=#008000&gt;// using - personalSite&lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#008000&gt;} // method - CreatePersonalDocumentLibrary&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Around the try block is where you will always have problems.&amp;nbsp; I haven't been able to find a way around it when doing proof of concept work as of yet.&amp;nbsp; If anyone has, please let me know.&amp;nbsp; The other method called ResetProperties is a small subset of this method which just resets the OnQuickLaunch and EnableVersioning properties to true on the SPList.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This by no means was something I'd put into production, but instead more of dumbed down code for this example.&amp;nbsp; There would be a good amount more code to do checks all over the place to make sure things exist and won't throw other types of exceptions.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=82401"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=82401" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/82401.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2006/06/19/82401.aspx</guid>
            <pubDate>Mon, 19 Jun 2006 23:52:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/82401.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2006/06/19/82401.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/82401.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/82401.aspx</trackback:ping>
        </item>
        <item>
            <title>SharePoint 2007 E-Learning Courses</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2006/06/13/81753.aspx</link>
            <description>&lt;DIV&gt;In my sparse spare time, I have been looking at SharePoint 2007 and what it has to offer.&amp;nbsp; I think that saying that it is a great improvement is a vast understatement.&amp;nbsp; Anyhow, there are some e-learning courses available now from Microsoft to get a head-start on it.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;A href="http://www.microsoft.com/learning/elearning/course/3370.asp"&gt;Course 3370: Getting Started with Microsoft Office SharePoint Server 2007 (Beta)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;In this clinic, you'll explore the 2007 Microsoft Office System to understand how it provides many benefits to an organization, including enhanced collaboration, personal productivity, and an effective enterprise content management solution. You will also explore the design goals and features of Office SharePoint Server 2007 and learn how to manage documents and Web content using Office SharePoint Server 2007.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;A href="http://www.microsoft.com/learning/elearning/course/3369.asp"&gt;Course 3369: Getting Started with Windows SharePoint Services 3.0 (Beta)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This clinic covers the benefits and business value of deploying Windows SharePoint Services, provides an understanding of how Windows SharePoint Services contributes to the collaboration solutions from Microsoft, and outlines the skills and knowledge required for an organizational deployment.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Stay tuned to this site for more e-learning courses coming soon at the &lt;A href="http://www.microsoft.com/learning/office2007/default.mspx"&gt;Microsoft Office 2007 Learning Portal&lt;/A&gt;.&amp;nbsp; &lt;BR&gt;&lt;/DIV&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http://geekswithblogs.net/podwysocki/archive/2006/06/13/81753.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://geekswithblogs.net/podwysocki/archive/2006/06/13/81753.aspx" border="0" /&gt;&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=81753"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=81753" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/81753.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2006/06/13/81753.aspx</guid>
            <pubDate>Tue, 13 Jun 2006 15:26:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/81753.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2006/06/13/81753.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/81753.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/81753.aspx</trackback:ping>
        </item>
        <item>
            <title>Automating SharePoint Deployment Through Post-Build Events</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2006/06/01/80382.aspx</link>
            <description>&lt;DIV&gt;When working on enterprise level applications and even smaller ones, I tend to automate everything for my builds as much as possible.&amp;nbsp; My recent experience with an enterprise SharePoint rollout is no different.&amp;nbsp; I'll walk through a basic scenario where I can deploy my web part library to my local instance through build events.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The prerequisite of this of course is that you have the templates installed.&amp;nbsp; If you do not, they can be found here:&amp;nbsp; &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=cac3e0d2-bec1-494c-a74e-75936b88e3b5&amp;amp;DisplayLang=en"&gt;&lt;U&gt;&lt;FONT color=#0000ff&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=cac3e0d2-bec1-494c-a74e-75936b88e3b5&amp;amp;DisplayLang=en&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Let's walk through a simple example of how you can automate the deployment.&amp;nbsp; First, launch Visual Studio 2003 and create a new Web Part Library project.&amp;nbsp; In this example, I will call my library ExampleWebPartLibrary.&amp;nbsp; This will create for you the following files:&lt;/DIV&gt;
&lt;DIV&gt;*&amp;nbsp; Manifest.xml&lt;/DIV&gt;
&lt;DIV&gt;*&amp;nbsp; WebPart1.dwp&lt;/DIV&gt;
&lt;DIV&gt;*&amp;nbsp; WebPart1.cs&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Sign the assembly by using the sn -k to create the strong name key and then place in the AssemblyInfo.cs.&amp;nbsp; Next, we will create a text file and place it in our project.&amp;nbsp; Right-click on the project and add new Text File.&amp;nbsp; Call this file &lt;STRONG&gt;MakeCabParams.txt&lt;/STRONG&gt;.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The file must contain the following text:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;TABLE borderColor=black cellSpacing=0 border=1 style="font-size: 11;"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;.OPTION EXPLICIT&lt;BR&gt;.Set CabinetNameTemplate=ExampleWebPartLibrary.cab&lt;BR&gt;.set DiskDirectoryTemplate=CDROM&lt;BR&gt;.Set CompressionType=MSZIP&lt;BR&gt;.Set UniqueFiles="OFF"&lt;BR&gt;.Set Cabinet=on&lt;BR&gt;.Set DiskDirectory1=.&lt;BR&gt;&lt;BR&gt;.\bin\debug\ExampleWebPartLibrary.dll&lt;BR&gt;WebPart1.DWP&lt;BR&gt;Manifest.xml&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;If you notice in the above, we specify the name of our .cab file as ExampleWebPartLibrary.cab.&amp;nbsp; We also specify which files it includes, including the debug version of my dll, the dwp and manifest.xml.&amp;nbsp; If you need to add any additional files, just add more files after manifest.xml.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Now,&amp;nbsp;let's take a look at the post-build event.&amp;nbsp; Go to&amp;nbsp;&lt;STRONG&gt;Project Properties&lt;/STRONG&gt; and then navigate to &lt;STRONG&gt;Build Events&lt;/STRONG&gt;.&amp;nbsp; Click the elipsis next to the &lt;STRONG&gt;Post-build Event Command Line&lt;/STRONG&gt; and enter the following text:&lt;/DIV&gt;
&lt;TABLE borderColor=black cellSpacing=0 border=1 style="font-size: 11;"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;cd $(ProjectDir)&lt;BR&gt;makecab /f MakeCabParams.TXT&lt;BR&gt;"c:\program files\common files\microsoft shared\web server extensions\60\bin\stsadm.exe" -o addwppack -filename ExampleWebPartLibrary.cab -globalinstall –force &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;As you note from the above text, we use the text file we created called MakeCabParams.TXT.&amp;nbsp; We also specified the name of the cab file to install.&amp;nbsp; After we do all of this, it is time to build the project.&amp;nbsp; Build the project and note the text in the output window.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Here is what you should expect:&lt;/DIV&gt;
&lt;TABLE borderColor=black cellSpacing=0 border=1 style="font-size: 11;"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;------ Build started: Project: ExampleWebPartLibrary, Configuration: Debug .NET ------&lt;BR&gt;&lt;BR&gt;Preparing resources...&lt;BR&gt;Updating references...&lt;BR&gt;Performing main compilation...&lt;BR&gt;&lt;BR&gt;Build complete -- 0 errors, 0 warnings&lt;BR&gt;Building satellite assemblies...&lt;BR&gt;Performing Post-Build Event...&lt;BR&gt;Microsoft (R) Cabinet Maker - Version 5.2.3790.0&lt;BR&gt;Copyright (c) Microsoft Corporation. All rights reserved..&lt;BR&gt;&lt;BR&gt;Parsing directives&lt;BR&gt;Parsing directives (MakeCabParams.TXT: 1 lines)&lt;BR&gt;17,850 bytes in 4 files&lt;BR&gt;Executing directives&lt;BR&gt;&amp;nbsp;&amp;nbsp;0.00% - ExampleWebPartLibrary.dll (1 of 3)&lt;BR&gt;&amp;nbsp;&amp;nbsp;0.00% - WebPart1.DWP (2 of 3)&lt;BR&gt;&amp;nbsp;&amp;nbsp;0.00% - Manifest.xml (3 of 3)&lt;BR&gt;100.00% - Manifest.xml (3 of 3)&lt;BR&gt;&amp;nbsp;&amp;nbsp;0.00% [flushing current folder] &lt;BR&gt;&amp;nbsp;94.43% [flushing current folder]&lt;BR&gt;&amp;nbsp;&amp;nbsp;4.09% [flushing current folder]&lt;BR&gt;100.00% [flushing current folder]&lt;BR&gt;Total files:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4&lt;BR&gt;Bytes before:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;17,850&lt;BR&gt;Bytes after:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3,203&lt;BR&gt;After/Before:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;17.94% compression&lt;BR&gt;Time:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0.04 seconds ( 0 hr 0 min 0.04 sec)&lt;BR&gt;Throughput:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;435.79 Kb/second&lt;BR&gt;&lt;BR&gt;examplewebpartlibrary.cab: Deploying to http://mydevserver/.&lt;BR&gt;Operation completed successfully.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;---------------------- Done ----------------------&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Build: 1 succeeded, 0 failed, 0 skipped &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;If you look in the GAC, you should&amp;nbsp;see the that there is indeed an entry&amp;nbsp;should you browse to C:\Windows\Assembly.&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;There is another way to do this without dealing with DWPs and such by using InstallAssemblies, which I have posted about before.&amp;nbsp; In order to utilize InstallAssemblies for your post-build event, simply change your Post-Build Event Text to the following:&lt;/DIV&gt;
&lt;TABLE borderColor=black cellSpacing=0 border=1 style="font-size: 11;"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;"C:\Program Files\Web Part Toolkit\InstallAssemblies\InstallAssemblies.exe" /assembly:ExampleWebPartLibrary.dll &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Of course it isn't the most elegant solution in the world because it pops up the UI during the middle of my build process and doesn't capture any of the information in the output window, which would be preferred.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Either way works really, but it is preferred to create the cabs for moving builds from environment to environment.&lt;/DIV&gt;
&lt;a href="http://www.dotnetkicks.com/kick/?url=http://geekswithblogs.net/podwysocki/archive/2006/06/01/80382.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http://geekswithblogs.net/podwysocki/archive/2006/06/01/80382.aspx" border="0" /&gt;&lt;/a&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=80382"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=80382" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/80382.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2006/06/01/80382.aspx</guid>
            <pubDate>Thu, 01 Jun 2006 20:25:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/80382.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2006/06/01/80382.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/80382.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/80382.aspx</trackback:ping>
        </item>
        <item>
            <title>Free SharePoint Tools - CAML Builder</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2006/05/19/78998.aspx</link>
            <description>&lt;DIV&gt;In some of my SharePoint experience, I have had some cases in which CAML is necessary.&amp;nbsp; So, I scoured the web looking for references when &lt;A href="http://www.u2u.info/SharePoint/U2U%20Community%20Tools/Forms/AllItems.aspx"&gt;CAML Builder from U2U&lt;/A&gt; was pointed to me.&amp;nbsp; The tool is quite easy to use, as I will show you down below.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;First off, let's go through the login screen.&amp;nbsp; You must specify at this point the URL of the SharePoint instance you wish to connect.&amp;nbsp; For this example, I will be looking at the personal site of TestUser.&amp;nbsp; You also have the option of connecting to the SharePoint instance either through Web Services or the API.&amp;nbsp; With the Web Services option, you have the ability to specify custom credentials, whereas with the API, you're pretty much stuck with the currently logged in user.&amp;nbsp; Let's take a look at the screen in detail:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;IMG src="http://tk.files.storage.msn.com/x1p8HtBCMd0ISzOD5o9fQ0VDu6ClThvz7CLE7UC-pJUHqo-dPmIARv-E-7ae12SOyzOEjzZ1BjxVV7nQdlM9k_3lpenjr3_WTKQHjQnUpKBz1-49fhFWDoCMT0Pb-mpQYDBggkGHrM9gvdwbU6bbMDQpA"&gt; 
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;Now that we have established our connection, let us take at the functions we can do in the CAML Editor.&amp;nbsp; Once you log in, the left hand navigation will display the lists available to query against.&amp;nbsp; In this instance, we will query against the Private Documents.&amp;nbsp; I stored documents in this library of Foo.doc and Bar.doc.&amp;nbsp; So, I will use the query tool&amp;nbsp;to find only Foo.doc.&amp;nbsp; As you&amp;nbsp;click on the list&amp;nbsp;you wish&amp;nbsp;to query, the&amp;nbsp;fields available will be populated.&amp;nbsp; So, click the first Name instance, click the Where checkbox and fill out the Value as Foo.doc.&amp;nbsp; Let's&amp;nbsp;take a look at that screen now:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;IMG src="http://tk.files.storage.msn.com/x1pqN4SVrgvmynbZrSWoPxWIme_p8bCE-mJHWieKFkJLq0HTOlscdwgVL0g6lM5od8MYbsPDeWcAWZTeRjGcTveD3kWURS-53lJCi3FNbtrxpfx_rKfkF5YtSTh9ozuO-aX"&gt; 
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; Now let's take a look at the CAML that it created for me in the bottom frame of the tool:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;IMG src="http://tk.files.storage.msn.com/x1pqN4SVrgvmynbZrSWoPxWIjdqFHc0r4TmeR1BafesQnMFZPPUgtGO6rEoLC7eXJdkNjW-ur1og-wnhE4ruP0K4jUUA355ougLrowr3IbG6Nn87U6b5OkufsC19drHTYbd"&gt; 
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This of course is all well and good, but unfortunately, the drag and drop up above does not allow for specifying which ViewFields to include.&amp;nbsp; You must at least from what I can see, enter them manually.&amp;nbsp; Maybe I'm missing something somewhere.&amp;nbsp; So, I click the Test and sure enough my data comes back as I expected as noted below:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;IMG src="http://tk.files.storage.msn.com/x1pqN4SVrgvmynbZrSWoPxWIoflcjJKauAPHWEU7EzIo1U3RzgQ5Qxsm9rTSsQfWGDmPA7tCHD7hFag5HdYU16V7ysbEsFrEezAZo1Xe9sJjUCmvJjj7rS_cu6aui6CAWEp"&gt; 
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;We can specify dynamic parameters as well.&amp;nbsp; Check the U2U blog for more things you can do with this tool:&lt;/DIV&gt;
&lt;DIV&gt;&lt;A href="http://blog.u2u.info/DottextWeb/patrick/archive/2005/05/29/3522.aspx"&gt;http://blog.u2u.info/DottextWeb/patrick/archive/2005/05/29/3522.aspx&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=78998"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=78998" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/78998.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2006/05/19/78998.aspx</guid>
            <pubDate>Fri, 19 May 2006 19:34:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/78998.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2006/05/19/78998.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/78998.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/78998.aspx</trackback:ping>
        </item>
        <item>
            <title>SharePoint - Creating a custom document library through ListTemplates</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2006/05/09/77739.aspx</link>
            <description>&lt;DIV&gt;I am currently on a rather large SharePoint implementation and over time I have gathered a lot of tips and tricks for SharePoint.&amp;nbsp; Quite frankly, if you took any XML configuration files from SharePoint and really dissected it, it would take weeks to fully understand what each does.&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Today, I am writing about how to create a custom document library through the ListTemplate and such.&amp;nbsp; In my example, we will create a custom document library to store resumes from the standard document library on the personal site.&amp;nbsp; First off, what we need to do is browse to the &amp;lt;Install Drive&amp;gt;\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\SPSPERS directory.&amp;nbsp; From this directory, we will notice that there are several folders here, XML (which we will get into later) and LISTS.&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The next step is to browse into the LISTS directory.&amp;nbsp; Create a folder named "RESUMEDOCLIB".&amp;nbsp; Since this is a simple document library with not much documentation there, we will copy the contents of the DOCLIB folder into the newly created RESUMEDOCLIB.&amp;nbsp; Your new folder should have the contents of the following:&lt;/DIV&gt;
&lt;DIV&gt;-&amp;nbsp; AllItems.aspx&lt;/DIV&gt;
&lt;DIV&gt;-&amp;nbsp; DispForm.aspx&lt;/DIV&gt;
&lt;DIV&gt;-&amp;nbsp; EDITDLG.htm&lt;/DIV&gt;
&lt;DIV&gt;-&amp;nbsp; EditForm.aspx&lt;/DIV&gt;
&lt;DIV&gt;-&amp;nbsp; FILEDLG.htm&lt;/DIV&gt;
&lt;DIV&gt;-&amp;nbsp; SCHEMA.XML&lt;/DIV&gt;
&lt;DIV&gt;-&amp;nbsp; Upload.aspx&lt;/DIV&gt;
&lt;DIV&gt;-&amp;nbsp; webfldr.aspx&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Before we get started, we need to make sure we are familiar with the field tables for default lists within SharePoint.&amp;nbsp; Here is a good list of them from Microsoft:&amp;nbsp; &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/tsovFieldsTable_SV01084251.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/tsovFieldsTable_SV01084251.asp&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The file that we are interested in now is the SCHEMA.XML.&amp;nbsp; Open the file in a text editor (I prefer &lt;A href="http://www.textpad.com"&gt;Textpad&lt;/A&gt;) and let's start going through it.&amp;nbsp; Locate the line with &amp;lt;List which is around line 4.&amp;nbsp; In this example, I will add a couple of fields to the list.&amp;nbsp; We will add, Resume Name, Resume Short Description and Resume Long Description.&amp;nbsp; Here is what it should look like when we are finished.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;lt;List xmlns:ows="Microsoft SharePoint" Name="Documents" Title="Shared Documents" Direction="0" Url="Shared Documents" BaseType="1" &amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;MetaData&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Fields&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Field Type="Text" Name="Title" ShowInNewForm="FALSE" ShowInFileDlg="FALSE" DisplayName="Title" Sealed="TRUE" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Field Type="Text" Name="Resume_x0020_Name" ShowInNewForm="TRUE" ShowInFileDlg="TRUE" DisplayName="Resume Name" Sealed="FALSE" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Field Type="Text" Name="Resume_x0020_Short_x0020_Description" ShowInNewForm="TRUE" ShowInFileDlg="TRUE" DisplayName="Resume Short Description" Sealed="FALSE" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Field Type="Note" Name="Resume_x0020_Long_x0020_Description" ShowInNewForm="TRUE" ShowInFileDlg="TRUE" DisplayName="Resume Long Description" Sealed="FALSE" /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Fields&amp;gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;After adding these fields, we should also change the default view so that they can be easily viewed containing our new items.&amp;nbsp; Do a search for ViewFields within this document.&amp;nbsp;&amp;nbsp; For me, it took me to line 984.&amp;nbsp; We need to modify the FieldRef tags to show the fields we want.&amp;nbsp; For example, we want to show DocIcon, LinkFileName, &lt;/DIV&gt;
&lt;DIV&gt;Resume Name, Resume Short Description, Resume Long Description, Last Modified, Editor, and LinkCheckedOutTitle.&amp;nbsp; Here is what the XML should look like after we are finished.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;lt;ViewFields&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name="DocIcon"&amp;gt;&amp;lt;/FieldRef&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name="LinkFilename"&amp;gt;&amp;lt;/FieldRef&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name="Resume_x0020_Name"&amp;gt;&amp;lt;/FieldRef&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name="Resume_x0020_Short_x0020_Description"&amp;gt;&amp;lt;/FieldRef&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name="Resume_x0020_Long__x0020_Description"&amp;gt;&amp;lt;/FieldRef&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name="Last_x0020_Modified"&amp;gt;&amp;lt;/FieldRef&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name="Editor"&amp;gt;&amp;lt;/FieldRef&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;FieldRef Name="LinkCheckedOutTitle"&amp;gt;&amp;lt;/FieldRef&amp;gt;&lt;BR&gt;&amp;lt;/ViewFields&amp;gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Save the file and let's move onto the ONET.XML.&amp;nbsp; Browse back up to the SPSPERS\XML folder and open the ONET.XML file in your favorite text editor.&amp;nbsp; In there, look for the &amp;lt;ListTemplate&amp;gt; XML Element.&amp;nbsp; Now what we need to do is add an XML Element that describes our new document library.&amp;nbsp; You can use the &amp;lt;ListTemplate&amp;gt; for doclib as an example.&amp;nbsp; Our new XML Element should look like the following:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;lt;ListTemplate Name="resumedoclib" DisplayName="Resume Document Library" Type="121" BaseType="1" OnQuickLaunch="TRUE" SecurityBits="11" Description="Resume Document Library" Image="/_layouts/images/itdl.gif" DocumentTemplate="101"&amp;gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Now one last thing we need to do is create a list using this template.&amp;nbsp; Do a search for &amp;lt;Lists&amp;gt; and it should put you near the location where we define lists.&amp;nbsp; From here, we need to add an XML Element &amp;lt;List&amp;gt; for our new item.&amp;nbsp; Below is the example of how we do this:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;lt;List Title="Employee Resumes" Type="121" Url="Resumes" QuickLaunchUrl="Resumes/Forms/AllItems.aspx" Description="Resumes are to be placed here."&amp;gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;As you can see, it is not hard to do these things, but you must become familiar with the SharePoint XML which at times can be confusing.&amp;nbsp; It is also quite nerve racking when you are dealing with XML configuration files this big.&amp;nbsp; I hope that's a good start on where to go from here.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=77739"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=77739" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/77739.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2006/05/09/77739.aspx</guid>
            <pubDate>Tue, 09 May 2006 20:15:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/77739.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2006/05/09/77739.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/77739.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/77739.aspx</trackback:ping>
        </item>
        <item>
            <title>Free SharePoint Tool of the Week - InstallAssemblies</title>
            <link>http://geekswithblogs.net/Podwysocki/archive/2006/05/04/77294.aspx</link>
            <description>&lt;DIV&gt;While working on a large SharePoint deployment for a major corporation, I came across many interesting tools to make my life easier.&amp;nbsp; During the development process, I found it to be a hassle to deploy WebParts to the server over and over again, going through those many steps.&amp;nbsp; During my searching for tools, I discovered InstallAssemblies which is a wonderful tool to allow the easy deployment of WebPart libraries to a SharePoint server.&amp;nbsp; The tool can be found as part of the Web Part Toolkit:&amp;nbsp; &lt;A href="http://www.bluedoglimited.com/Downloads/Files/1/Web%20Part%20Toolkit%20-%20v1.6.0.2.zip"&gt;http://www.bluedoglimited.com/Downloads/Files/1/Web%20Part%20Toolkit%20-%20v1.6.0.2.zip&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I found this tool to be very simple to use and rather straightforward.&amp;nbsp; This tool gives the user the ability to deploy a WebPart library and generate the dwps and the web part package.&amp;nbsp; It also allows for the selection of the installation, whether it be the local bin or the Global Assembly Cache (GAC).&amp;nbsp; This tool is great for local development on a Virtual PC or a VMWare image.&amp;nbsp; I would never suggest to use this in any sort of production environment.&amp;nbsp; &lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Now that we covered the basics, let's try running through this once.&amp;nbsp; First, launch Visual Studio (In my case it is Visual Studio 2003 since my major clients still use it) and create a WebPart library.&amp;nbsp; For this example, I used MyFirstWebPartLibrary as the WebPart library.&amp;nbsp; Assign a strong name key to the assembly using the standard "sn -k MyKeyFile.snk" and use the file name in the AssemblyKeyFile attribute.&amp;nbsp; Build the application into the local bin.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Next, launch the InstallAssemblies application from the location that you unzipped the archive file from above.&amp;nbsp;&amp;nbsp; Once the application is open, select the Web Part Deployment and select the Generate dwps and Save Web Part Package options.&amp;nbsp; For this example, we will choose to install the application in the GAC and Generate SafeControl entries.&amp;nbsp; Your screen should look like the following:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;IMG height=337 src="http://tk.files.storage.msn.com/x1pqN4SVrgvmynbZrSWoPxWIpNOBzKAa5z9ZnEagiWfaQ4scUzxmNNkpnL1O5Po1NHF2fw3WaUYAcJOh79KJWmbq0cKzauGe7jAmZbP5W4iJQ10ID2utOOPYi22cmq_hDFs" width=450&gt; 
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The neat part about this tool is to also view the generated dwp file.&amp;nbsp; Click the View dwps button and it will launch a directory to view the directory which contains the dwp files.&amp;nbsp; From that directory, I opened the dwp file in TextPad (my favorite text editor) and here are the results:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT color=#0000ff&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;BR&gt;&amp;lt;!-- Web Part dwp created by InstallAssemblies.exe on 5/1/2006 2:33:39 PM --&amp;gt;&lt;BR&gt;&amp;lt;WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;Assembly&amp;gt;MyFirstWebPartLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=233a0b797fd607df&amp;lt;/Assembly&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;TypeName&amp;gt;MyFirstWebPartLibrary.WebPart1&amp;lt;/TypeName&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;Title&amp;gt;WebPart1&amp;lt;/Title&amp;gt;&lt;BR&gt;&amp;lt;/WebPart&amp;gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The only part left is to click the Install button in the upper right.&amp;nbsp; Once the button is clicked, the status message area will be filled in with the results.&amp;nbsp; Like I said, very easy tool to use and very handy during development.&lt;/DIV&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=77294"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=77294" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/Podwysocki/aggbug/77294.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Matthew Podwysocki</dc:creator>
            <guid>http://geekswithblogs.net/Podwysocki/archive/2006/05/04/77294.aspx</guid>
            <pubDate>Thu, 04 May 2006 20:54:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/Podwysocki/comments/77294.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/Podwysocki/archive/2006/05/04/77294.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/Podwysocki/comments/commentRss/77294.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/Podwysocki/services/trackbacks/77294.aspx</trackback:ping>
        </item>
    </channel>
</rss>