Blog Home  Home Feed your aggregator (RSS 2.0)  
.Net Jonesie - Sunday, July 06, 2008
A simple programmers blog
 
# Sunday, July 06, 2008

Is it just me, or does anyone else find themselves driven to buy funny stuff?

StraightCroissants

Sunday, July 06, 2008 3:32:52 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [1]   General  | 
# Saturday, July 05, 2008

A couple of weeks ago I upgraded our Team Foundation Server from 2005 to 2008.  This is my story…

I was very nervous about upgrading the server as the installation procedure requires un-installation of the existing TFS2005 version and an install of TFS 2008 over the top.  The source code and work items are very important asset for us and loosing them, even for a day, would cost us a lot of money (and be somewhat embarrassing).  So, I was very careful about the process. 

Preparation

I needed to ensure that I could recover our current TFS installation should the upgrade go pair-shape so I created a Virtual Server image on our main domain with a clean install of TFS 2005.  I then restored the TFS setup to this new server, which had a new name.  Microsoft provide detailed instructions on how to move a TFS install here:  http://msdn.microsoft.com/en-us/library/ms404860(VS.80).aspx. This process also taught me how to do a disaster recovery – a very useful and necessary skill!

The creation of the VM, getting it on the domain, installing TFS, migrating the databases and reconfiguring the server took me the best part of 3 days.  I took my time and followed the instructions precisely.  If I had to do this again it don’t think it would take more than a day.

I also migrated the SharePoint content to the new server.  This is documented in the above MSDN article.

I tested this new install, and while it was slow, it all worked and developers could connect and do work.

The testing highlighted a couple of issues.  I had installed Conchango’s Scrum Template on TFS but it was not being used so I had uninstalled it. Unfortunately it had made some changes to the TfsWarehouse database that did not get removed during uninstall.  The test scrum projects were deleted but I didn’t want to futz with the database directly so the scrum stuff had to stay.

Doing it for real

After all the preparation, the upgrade process was somewhat anti-climatic.  It took an hour and half to uninstall TFS 05 and install TFS 08.  Again, the instructions provided my Microsoft are precise and simple to follow.

I next updated Team Build and Web Access with the latest versions,  Again, this was very simple and painless.

Problems

On the Monday morning following the upgrade I found that the Warehouse cube was not being updated.  In fact, some of the dimensions were empty.  It turned out there was a permissions issue with the analysis services. The error in the event log was :

Some or all identity references could not be translated.

A bit of Googling around quickly solved that one: http://blog.salvoz.com/2008/01/26/TFSWarehouseIssues.aspx

During my test run I had a lot of trouble with the SharePoint Services upgrade.  As we don’t use the project portals very much. I made the decision to stick with WSS2 for now.  Next time one of our SharePoint config guru’s is in town I may get it updated, or we might just switch to using the corporate MOSS platform.

I’ve now also notices that some Team Builds are failing.  It appears that projects using our custom Work Items are having a problem building.  I haven’t had time to investigate this yet, but I don’t expect it will be too hard to solve.

Recommendations

If you need to do any work with TFS read the MSDN documentation first – it’s exhaustive and complete. For any issues or problems Google first then post a message on the MSDN TFS forums – you will almost always get a quick answer from a Microsoft expert, MVP or other similarly brainy person.

Put your hand up if you can afford to lose all your source code – for even a day.   Hmmm, I thought so.  Create a disaster recovery plan and test it.  Yet again, Microsoft provide all the documentation you need for this on MSDN, but here’s what I did:

  1. Create a VM with Windows Server installed on it.
  2. Add the server to the same domain as your current TFS install.
  3. Install TFS and all the same bits you have on your production system.
  4. Backup the VM.
  5. Now test the DS plan on the VM using the move instructions from MSDN (above).
  6. If you update your production server then remember to update and test the DS system again.  In fact, test the DS system regularly - once a year or more often.

In summary I found the upgrade a very pleasant experience, aided greatly by the detailed and copious documentation from the tireless TFS team at Microsoft and the large volume of community blogs and forums.

Saturday, July 05, 2008 7:57:12 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   General | Team System  | 
# Friday, June 06, 2008

Have you ever wanted to share your desktop with another user somewhere on the Internet or in another office?  There are a few tools available to do this but I recently found Microsoft SharedView.  This is great free utility that works everytime. 

You can share your whole desktop or just a single window with as many users as you like.  You can grant control to any of those users and chat with them online.  Users connect via HTTP over port 80 and are authenticated with a Live login so it's pretty safe.

I've found this a life save several times recently, most recently today when I needed someone in our Wellington office to configure a VM on my local machine.  Access through the domain wasn't working for some reason - firewall issues or something like that - but SharedView just cut through the noise brilliantly.

Check it out!

Friday, June 06, 2008 4:46:41 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   General  | 

Yesturday Microsoft announced the Visual Studio 2008 version of Visual Studio extensions for WSS (v 1.2). It is available for download now!  This took me by surprise as I thought it was scheduled for next month - but earlier is better!

Also, checkout the spunky new site for SharePoint developers:  http://www.mssharepointdeveloper.com/.  This is a great central resource for getting started with SharePoint dev.  It contains a bunch of FREE learning material - 10 Virtual Hands On Labs to be precise - and links to other goodies.

FYI: A gang of kiwi's were heavily involved in creating some of this material, including myself and some other's at Intergen and of course Paul Andrew.

Friday, June 06, 2008 4:40:51 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   General | Sharepoint  | 
# Thursday, June 05, 2008

So here is how to loose a server off the domain without even touching it.

  1. Grab any old machine (or VM in my case) that is in a WORKGROUP and give it a name the same as a machine on the domain.  Reboot.
  2. Rename the machine but dont reboot.
  3. Join the machine to a new workgroup but dont reboot.
  4. Join the machine to the domain.
  5. Bingo!  The real machine with the old name will be removed from the domain!  Cool eh?

In my case this was bad.  VERY bad as the VM in question had the same name as our TFS server.  After joining the newly named VM to the domain our devs started whining about TFS being down.  There was a brief OMG moment.  But then it got worse when we found that the local machine account password wouldn't work.  To cut a long story short, phycially disconnecting the server from the network allowed us to login with my domain account (using cached credentials) and from there we were able to rejoin the machine to the domain.

Phew!

Thursday, June 05, 2008 5:43:55 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [2]   General  | 
# Sunday, May 25, 2008
Rod makes some interesting observations and suggestions for Microsoft.  While there is less chance of me being CEO at Microsoft than there is of Helen Clarke being PM one more time (might live to regret those words...) here's what I would do.

1) Forget office.   It's not going anywhere.  With the new Office Xml and ODF file formats there is plenty of room for any coding monkey to whip up a compatible niche product. These apps will chip away till there's nothing left.  90% of Word is never used, web based mail does a better job than Outlook for day to day mail needs - or at least good enough, Excel - I guess a few people use it but does it do anything that any other spreadsheet app can't do - AND - people use regularly?  The Office dominance is mostly due to the Office dominance and unless they do something radical about the rediculous licensing cost then it will dissapear faster than an litre of $1.99 petrol.

2) Branding is nothing without good product.  I'm sure I'm more gullable thant most at the subconcious level but dont get me started!  I'd sack the whole Marketting department (and shoot Apple's, Google's and any other Marketting guy in sight).  Brainwashers all of them!  Hire a few talented artists and just state the facts, eg: 'Word - use it to do stuff - $99'.

3) Open Source if you have to, but it's far less relevant than good WELL DOCUMENTED, SIMPLE product.  I love SharePoint now but if I have to work that hard again for another enterprise product, I'll be changing careers (oh crap, another burnt bridge).

4) Forget the aquisitions.  Microsoft is stacked with exceptional talent already.  Free up the brains and let them loose on creating something new and extraordinary, like...

5) Create a new OS that throws out all the old bagage.  You dont need to start from scratch - we need something this century - but dump support for the old shit.  90% of the OS should be SaaS'ed.   And there has to be zero maintenance.  My TV, fridge, phone, oven and toilet work with very little maintenance.  Why should I have to spend so much time keeping my PC working??  And I dont want to have to upgrade every 3 years.  My cars are 15 years old and get me from A to B just as well as anything else.

6) Make products my mother could use.  As an industry we are all guilty of missing the small picture.  By all means, cater for the enterprise geeks but remember the noobs too.  Imagine if you had to go to night school to learn how to use a TV . Computers need to be made simpler.

7) Consistancy please! The box-of-choclates strategy may have worked for Forest Gump, but it fails misserably for software.  Users/developers dont like surprises.  It feels like the different teams at Microsoft are not aligned very well.  Need to mix things up a little more often.

8) Make licensing simpler.  If you need a computer to figure out the license cost then it's too complex.  Instead, set a realistic per user/server price for each market and let the regional offices do deals.

9) Don't become the next IBM!  Stay away from hardware and services.  Stick to what you know best - creating innovation and integrating it.

10) Linux is not a threat to the desktop so ignore it.  For the server, concentrate on making it easier and more fun for developers and administrators.  And when I say easy, I really mean SIMPLE.  For example, you should be able to explain every technology on a single white board in less than 10 minutes, well enough for an intermediate level techo to run with.  If you can do that well then Linux for the server will also die it's well deserved death.

11) Buy Apple and cancel the iPhone.  I dont have one so no-one else can either! 

12) Social networking sites are just a string of uselsss fad's.  They do nothing to improve the human race. Dont get sucked in!  Unless of course you do it with a decent mobile device... maybe something like an iPhone... but much better.


I did say up front I would never be CEO of Microsoft :)

Sunday, May 25, 2008 8:55:31 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [1]   General  | 
# Wednesday, May 14, 2008

The Team System and .Net User Group are having a combined session next week.

Ron Jacobs!!!


The Perfect Pattern Storm, where Test Driven development (TDD) meets User Experience (UX) and MVP
Christchurch 20/05/2008
Gather at 5:00 pm, starting at 5:30 pm

Presented by Ron Jacobs

As long time host  of ARCast.TV, Ron Jacobs has a front row seat to observe the constantly shifting architectural landscape. In this session we will consider what happens when the force of test driven development (TDD) collides with the demand for better UX.

Ron Jacobs is a Sr. Technical Evangelist in the Microsoft Platform Evangelism group based at the company headquarters in Redmond Washington. Ron's evangelism is focused on Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Since 1999 Ron has been a product and program manager on various Microsoft products including the .Net Framework, Windows Communication Foundation and COM+. A top-rated conference speaker, author and podcaster, Ron brings over 20 years of industry experience to his role of helping Microsoft customers and partners to build architecturally sound and secure applications.


RSVP via the link on the .Net User Group Site.  Space is limited so get in early.  Note, this session is at Intergen rather than the usual venue.

Wednesday, May 14, 2008 9:16:40 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   General | NZ .Net User Group  | 
# Sunday, April 20, 2008

Today I notice a blog thread initiated by a post from MVP Jeffrey Palermo on the merits of SharePoint as a development platform

Jeffrey lists a few facets of what makes a great development platform, most of which I agree with. 

  • Easy to install
  • Easy to configure
  • Integrates well with simple tools
  • Easily extended to make simple tools
  • Easy to debug
  • Easy to create test automation
  • All configuration stores easily in source control
  • (Others He forgot)

I'm the first to moan and rant about the pain of SharePoint but this is mostly based on ignorance and impatience.  I'm learning fast and am starting to appreciate the benefits of using SharePoint as a development platform.

But back to the original question:  Is SharePoint a Great Development Platform? Using Jeffry's list above lets see.

Easy to install :  There's only a few options in the installer and once you understand what each means and why you would chose each option, then yes, I think it's very easy to install.

Easy to configure : For out of the box operation of WSS or MOSS it's not too bad.  If you want some enterprise features then there is quite a bit of configuration to wade through.  So, maybe yes, maybe no - it depends.

Integrates well with simple tools : Not totally sure what Jeffrey means here but I think he's talking about development tools.  On that basis, you would have to say yes.  Visual Studio 2005 and the SharePoint extensions make it very easy to create and deploy features.  Visual Studio 2008 support is coming for VSeWSS but it does a better job with SharePoint sites already.  There is also a huge number of tools and samples for SharePoint from the community and vendors.

Easily extended to make simple tools : Not sure this really applies to SharePoint. It can certainly be extended - very easily in fact - but for simple tools?  Simple is not a word I associate with SharePoint.

Easy to debug :  Definitely yes - from within Visual Studio.  However, diagnostically it can be tricky so I'd say that's a maybe.

Easy to create test automation : It's no harder than any other server platform.  We have created unit tests for MS CRM - if you can test that you can test anything! 

All configuration stores easily in source control : Source control of web.config is a pain for most web sites, more so with SharePoint. If your doing SharePoint development properly then you may have less configuration that normal web sites.

Other Stuff : SharePoint provides so much base functionality out of the box.  Any pain you experience must be weighed against the benefits and time savings that are delivered by this.

 

To fail SharePoint for development on the basis that you have to use a server OS ??  Sorry, but this is ridiculous.  I can't imagine any serious developer using XP or Vista as a development OS.  Why? 

  • It's not what you are delivering applications to - certainly with SharePoint. 100% of the solutions I have delivered in the last 3 years have been for Windows 2003 Server and one of the server products running on it (SQL 2k, SQL 05, WSS etc).
  • You can only easily run 1 web site at a time - yes yes, you can fiddle that but it's a PITA
  • You can't run any of the server software you need to code against.

Of course, if you only create single user desktop widgets then you can probably use XP or Vista quite happily.

SharePoint is a large complex beast.  It's not another .Net API or some little platform you can learn in 20 minutes.  It's designed to solve complex human problems and manage data in many different formats.  I can't say for sure if it's a great development platform or not, but I KNOW for a FACT that Microsoft are working very, very hard to make it so.

 

Sunday, April 20, 2008 9:22:24 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   Sharepoint  | 
# Sunday, April 06, 2008

I often spend a lot of time trying to find stock images and fluff for sites. Luckily our office has a talented chap who normally does all this stuff before we need it.  However, occassionally he's not around or I need something at home.

I just found this site:  http://www.ajaxload.info.  You can use this to generate a stack of spinny progress indicated thingies.  Very useful!

 

Sunday, April 06, 2008 9:48:00 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   General  | 
# Thursday, April 03, 2008

A few people have been doing some great things in the community and it's fantastic to see them get recognition.

Congradulations to :

  • JD Trask (ASP.Net)
  • Ivan Towlson (Windows Client - WPF) (having an MVP award will soon be a pre-req to getting a job at Mindscape! :)
  • Zachary Smith (Sharepoint)
  •  

    Somehow I also managed to scrape in for another year.

    Thursday, April 03, 2008 9:21:30 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   General  | 
    # Tuesday, April 01, 2008

    Keep these dates free if you can afford it:

      May 20 in Sydney
      May 22 in Melbourne

    Booking open from 7 April ish.

    More details soon.

    Tuesday, April 01, 2008 10:33:31 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   General  | 
    # Monday, March 31, 2008

    Thanks to Chris Johnson I now know how to create a feature staple with VSeWSS.

    If you don't know what a staple is then Chris has a good description on his blog.  You should read this first for more background but my simple explanation of a feature staple follows.

    Feature staples are a way of attaching customisations to existing features and hence site definitions.  This is acheived by creating a feature that associates itself with another feature.  You can also add Feature Receiver code (which is like an event handler for feature activation) that lets you do all sorts of goodness that you can't do with CAML.

    Feature stapling is the reccommened way of customising SharePoint.  Site definitions may appear to be a good way to go, but dont.  Andrew Connell explains why.

    To create a staple you actually need to create two features:  the feature that you want activated and a feature to do the stapling. 

    Update:  I just found a much better description of the process here.

    VSeWSS 1.1 does not yet support feature stapling via an item template, but you can still do this via a neat trick that the VSeWSS team provided.  Here's the steps.

    1. Create an Empty VSeWSS project:


    2. Add a module for the feature you want stapled.  This this case I just used the default module that copies sample.txt.
    3. Switch to WSP View and refresh.
    4. Open the module feature.xml and change the scope to Site.
    5. Open the Module.xml for the new module and change the Url to "MyModule" and add RootWebOnly="FALSE":


    6. Deploy the solution and make sure that you get sample.txt in a new folder MyModule.
    7. Now for the stapler.  In the solution explorer, create a new folder called Stapler.  Add a new XML filed to this called element.xml.  This will contain the feature associations:

      This element.xml contains 3 associations for the new Module.  The Id GUID is from Module1.  Get this value from the WSP View of Module1 feature.xml.  The TemplateName is found in 12\TEMPLATE\1033\XML\WEBTEMP.XML - STS is the name of the templte and #0, #1, #2 is the configuration.  So, this staple associates Module1 with Blank Site, Team Site and Document Workspace.

      Make sure the element Id is a new unique GUID.  WSP uses this.

      Note: there are issues with the blank site.  I can't find the reference to the explaination of this.. will update when I do.
    8. Switch to WSP View and refresh.  You should see a new Feature appear for the staple called Untitiled1.  Rename the folders to the name of your stapler thus:


      You should also change the Title in the feature.xml.
    9. Edit the feature.xml for the Stapler and set the Scope to Farm:  
       
    10. Deploy and pray.
    11. Test & checking.  The stapler feature will be deployed to the farm.  Check the Farm Features to make sure it's there. VSeWSS will also deploy the module to the default site so you need to create a new site to test that the staple works. 
    12. Create a new Team site.  Use SharePoint designer to see if the MyModule folder is created.
    13. Now that you have the stapler working you can create a feature receiver to perform any code based actions.  I haven't done this part yet.  I'll post again when I do.

    Normally you will use this method to deploy a master page, aspx page, css etc.  If this is the case then you probably don't need to copy these files to every sub-site, just to the root site.  Set RootWebOnly to TRUE if you want.  Remember that if Module1 is copying files to a library then you need Type=GhostableInLibrary for each file that is copied.

     

    Monday, March 31, 2008 8:31:43 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   Sharepoint  | 
    # Wednesday, March 26, 2008

    I'm not very good at managing my daily tasks.  The only way I am half reasonable is to create todo lists.  This works for a day or until I lose the peice of paper I scribble the tasks on.

    Luckily, there is a better way:  ActionThis!

    Use ActionThis to help you and your team work together more effectively, using the power of the web combined with Microsoft Office.

    Thousands of people worldwide use www.actionthis.com to manage the tasks small businesses, teams and their partners need to complete to succeed. Delegate tasks from Microsoft Outlook, connect with your team on the ActionThis task management website, track progress and take action with live reports delivered to your email inbox.  ActionThis is free to try, and simple to use. Less time following up, more tasks completed, your business is more productive. ActionThis was designed and developed by Intergen in New Zealand and will help you and your team get things done.

     

    How ActionThis helps you get stuff done

    ·         Use Microsoft Outlook to create and assign tasks to yourself, your team, your partners

    ·         Organize and access these tasks from anywhere using Microsoft Outlook or the www.actionthis.com website

    ·         Keep track of progress, projects, and workload with reports emailed to your email inbox

    ·         Keep on top of overdue tasks with live alerts designed to help you take action quickly

    ·         Export and analyze your progress with Microsoft Excel

    ·         Telephone and email support is free

     

    Try it for free. Sign up for a one month free trial at http://www.actionthis.com/product/trial.aspx and use this referral code: INT531.

    Wednesday, March 26, 2008 8:56:18 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   General  | 
    # Thursday, March 20, 2008

    I'm often asked 'How do I get to be a great programmer like you Pete?'.  Well not quite, I added the last bit, but Tokes provides a better answer than I ever could. 

    I completely agree with Tokes, being a (Microsoft) developer is getter way harder. But it's not Microsoft's fault.  It's those pesky users.  I always said that being a developer would be a piece of cake if it wasn't for users!  They seem to want more and more every year and are less impressed by coded coolness.   In fact, I think there is a formula to calculate coolness:

      

    (C is Coolness, loc is lines of code, si is systems integrated, To is time overrun)

    Time seems to be suffering too.  As systems and requirements grow in complexity there seems to be some sort of temporal distortion reducing the amount of time available to a developer. I think Stephen Hawking discovered this when he ran out of budget for his black hole simulator (SimHole).

    Developers must also share the blame for increasing complexity. We are always chasing the next best thing without much regard for using what we already have.  Microsoft's job is to create temptation - it's us developers that can't keep our hands out of the cookie jar.  Visual Basic 6 is still a great tool.  Visual Studio 2008 just looks prettier!

    It's no wonder that fewer and fewer kids are taking up IT as a career. Although, with both parents in the industry my 3 kids seem to be heading in the right direction.  Maybe we as developers should procreate more?

    Thursday, March 20, 2008 3:51:38 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [2]   General  | 
    # Monday, March 17, 2008

    I had a custom field type in my MOSS solution that was a simple CODE type.  This was based on a Text type but all it did was to uppercase any value.

    However, when I referenced a list that used this field type from InfoPath the column would not display in InfoPath.

    I haven't figured out how to do this yet so I reverted back to a Text field for now.  I'm guessing there is an attribute I need to add the the module.xml or maybe in code? If you have a solution, I'd love to know :)

    Monday, March 17, 2008 8:49:17 AM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   Sharepoint  | 
    # Friday, March 14, 2008
    Friday, March 14, 2008 3:16:30 PM (New Zealand Daylight Time, UTC+13:00)  #    Comments [0]   Sharepoint  | 

    I truly wish you haven't been wasting as much time as I have this week with SharePoint anonymous access and a custom master page.

    I have a site that uses a custom membership provider, forms authentication, anonymous access and a custom master page.  My problems were many but in the end the main one was getting anonymous access to the home page.  This would always give me an ugly 401 error.

    After a good nights sleep and with a clear head, I finally realised that the problem was not with Pages/default.aspx but with it's masterpage which as not deployed correctly.  I had missed putting type="GhostableInLibrary" into the file node of the module:

      <Module Name="MasterPages" Url="_catalogs/masterpage" Path="" RootWebOnly="TRUE" >
        <
    File Path="mine.master" Url="mine.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="FALSE" />
     
    </Module>

    It's the little things that can really screw you!

    TGIF.

    Friday, March 14, 2008 9:28:49 AM (New Zealand Daylight Time, UTC+13:00)  #    Comments [1]   Sharepoint  | 
    # Thursday, March 13, 2008

    If you are having problems creating a State Machine workflow for SharePoint in VB (and I really dont know why you would want to use VB but... :) then you may see an error about missing files, Workflow1.layout and Workflow1.resx.  If this is the case then you need to copy these files from the C# Project Tempalte zip to the VB version.  Full details are in the following blog post comments- it's a long one so search for workflow1.layout to find it.

    http://blogs.msdn.com/sharepoint/archive/2006/06/07/introduction-to-sharepoint-workflow.aspx

    Thursday, March 13, 2008 10:40:25 AM (New Zealand Daylight Time, UTC+13:00)  #    Comments [0]   Sharepoint  | 
    # Monday, March 10, 2008

    A blog-less colleage of mine, Bryce, just discovered redirects in IIS 6, which is something new for me also.  Bloody useful if you are moving site content around, moving servers or just want to make URL's more friendly.

    http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/41c238b2-1188-488f-bf2d-464383b1bb08.mspx?mfr=true

    This is particularly relevant for sites with really long and complex URL's, e.g.: SharePoint, in which case you should also read:  http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=48

    Monday, March 10, 2008 9:34:16 AM (New Zealand Daylight Time, UTC+13:00)  #    Comments [0]   General  | 
    # Thursday, March 06, 2008

    To create a forms library definition with VSeWSS 1.1 is very easy.  You can similarly create a list definition based on a content type.  However, you cant automatically create a forms library with an attached content type.

    This is how I did it.

    1. Create your content type
    2. Create a temporary list based on the content type
    3. Create a form library list
    4. Edit the forms lib schema.xml
      1. Copy the content type fields from the temporary list schema to the <Fields> node.
      2. Update the <List> node, adding:

      3. BaseType="1"
        Direction="0"
        EnableContentTypes="TRUE"

      4. In <ContentTypes> optionally remove the base Form content type reference if you only want to allow the specific content type:

        <ContentTypeRef ID="0x010101"> ... </ContentTypeRef>

      5. Add a new <ContentTypeRef> that has the ID that matches the content type you created in step 1.

    5. Delete the temporary list definition
    6. Deploy and cheer!

     

    Thursday, March 06, 2008 11:45:50 AM (New Zealand Daylight Time, UTC+13:00)  #    Comments [0]   Sharepoint  | 
    # Monday, March 03, 2008

    Here's a small trick that confused me for a while this morning.  VSeWSS creates a setup.bat & .wsp file that will deploy a site definition into a specified server.  Running setup.bat from the command prompt appears to be the obvious way to do that.  You can also override the default web and site urls, e.g:

    setup /weburl http://myserver /siteurl http://myserver

    The default being localhost (or whatever you developed against).

    However, this was failing for me becuase the specified web did not yet have a root site collection and some part of the site definition (web parts) were scoped to the site.

    The solution is to create a blank site using stsadm thus:

    stsadm -o createsite -url http://myserver -ownerlogin administrator -owneremail me@myemail.com

    Then you can deploy the site defintion using setup.bat. When you browse to the new site you will be prompted with a list of possible site definitions.

    Like all things SharePoint this is easy and obvious when you know...

     

    Monday, March 03, 2008 12:42:09 PM (New Zealand Daylight Time, UTC+13:00)  #    Comments [0]   Sharepoint  | 
    Copyright © 2012 Peter G Jones. All rights reserved.
    DasBlog 'Portal' theme by Johnny Hughes.
    Pick a theme: