Aug15

Difference Disks = Win

 Categories: Development, General, Tools

Huge thanks to Reza Alirezaei for his series of posts on creating your own time bombed VM.

After reading that I thought to myself, 'hey, I could use that technique to keep a set of different VMs across multiple projects with the same base set up'.

After a couple of hours of installing, configuring and tinkering with a base MOSS Dev VM followed by 20 minutes of setting up difference disks I now have a shiny new set of VMs running off a common base.

If you're anything like me and love working with virtual machines I strongly suggest that you look at this technique, it's saved me a good deal of disk space and lowered the time to set up a new development environment to but a few minutes.

 
 
Aug13

Pre-Populate a SharePoint List Instance

 Categories: CAML, Development, SharePoint

So, you want to provide a look-up in a SharePoint Site Definition and you'd quite like to provide your users with some options? (i.e. items in the source list)

Firstly you're probably interested in this post from Josh Gaffy about adding a lookup column declaratively using CAML.

Next you'll be wanting to use this snippet to declare your source list and the data it will contain.

   1: <?xml version="1.0" encoding="utf-8" ?>
   2: <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   3:       <ListInstance FeatureId="89CA0ED1-8E9B-48fa-8C4D-CB406544D662"
   4:                 TemplateType="100"
   5:                 Title="Option List"
   6:                         OnQuickLaunch="TRUE"
   7:                 Description="Choices"
   8:                 Url="Options" >
   9:             <Data>
  10:                   <Rows>
  11:                         <Row>
  12:                               <Field Name="Title">Foo</Field>
  13:                         </Row>
  14:                         <Row>
  15:                               <Field Name="Title">Bar</Field>
  16:                         </Row>
  17:                         <Row>
  18:                               <Field Name="Title">Fred</Field>
  19:                         </Row>
  20:                         <Row>
  21:                               <Field Name="Title">Mildred</Field>
  22:                         </Row>
  23:                         <Row>
  24:                               <Field Name="Title">Karl</Field>
  25:                         </Row>
  26:                         <Row>
  27:                               <Field Name="Title">Lenny</Field>
  28:                         </Row>
  29:                   </Rows>
  30:             </Data>
  31:       </ListInstance>
  32: </Elements>

Hope that someone finds this useful.

 
 
Aug12

Handy CAB tool

 Categories: Tools

Alright, I've just had to edit an existing wsp :o|

I won't go into the why and wherefores, suffice to say that I decided that the easiest way to achieve my end was to extract the contents, edit the necessary XML file and repack the cab.

Now I didn't feel like writing a ddf and using MAKECAB.EXE for this quick hack, so I had a quick Google Live Search ;o) and found CabPack 1.4 sure it was last written in 1999 but it works, it's free and the UI is dead easy to use.

That is the total extent of the UI, there is easy to follow documentation provided too.