in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

cmetral's blog

  • Build your webparts with NAnt

    Well, first post for a long time now …

     

    Following this post of my co-officer Renaud (himself following this one from Mads Nissen), I looked for a better way to build the CAB file, because I'm not an addict of his javascript hack. I thought it was possible, and I did.

     

    The main problem when building the CAB file is how to generate the DDF file. How to get the content files of the project ? Of course by reading the CSPROJ file (nothing else than an XML file).

    But the task can only get a single value, not a list of values. And more than one project have more than one content file. So, before coding a new task (not a bad thing to learn by the way), I googled a little bit of my time and found this post on the Serge's blog, inspired of this Richard Case post.

     

    That's the solution : use task to get all file refs from CSPROJ file and write the ddf file accordingly. So :

     

    1. Create a temp directory
    2. Generate the DDF header lines in a file that you store in the temp dir with task <echo>, using attribute file. To change destination directory for the CAB file, change the .Set DiskDirectory1 parameter. Example : .Set DiskDirectory1=${project::get-base-directory()}/${build.dir}
    3. Get the compiled assembly (using <xmlpeek> task to get name and build location for the assembly from the CSPROJ ? Why not …), copy them into the temp directory and add the file name in the DDF file (use append attribute for task <echo> to avoid overwrite in the file).
    4. Use <xmllist> with xpath="//VisualStudioProject/CSHARP/Files/Include/File[@BuildAction='Content']/@RelPath", iterate in the list with the task <foreach> (delim="," if you didn't specify anything in the task <xmllist>), copy the corresponding file in the temp directory and add it to the DDF file.
    5. Now execute the makecab.exe with the task <exec> (using workingdir attribute can help).
    6. Delete the temp dir

     

    It does the job. NAnt and community power ! Enjoy !

     

    Note : A little bit of light info about the DDF file here.

     

    Updated : This example may help.

  • Quality is invisible ...

    From the last post of Erol, an interresting checklist for webpart developpers here.
  • Where is the sun ? (or where to find the european weather)

    I spent some time yesterday looking for a weather webservice in order to develop a webpart that shows forecasts ... and I have to say that United States are well desserved, but Europe seems late.

    I found mainly 3 webservices :

    • capscience : get the current weather report (with a little delay), but only the current (no forecasts).
    • ejse.com : get the current weather and forecasts (until 9 days !) everywhere in the United States (according to the zip code) or the current weather in ... Iraq !!
    • NOAA : get complete weather conditions and forecasts, with icons ! Just input the latitude and negative west longitude and it gives you what you need ... if you are in the United States. Nothing is said if forecasts are right for european locations ... (Note that you can get weather by an RSS feed !)

    So, I think I'll have to look through the window and write my webpart with what I see :-) And imagine for the following days ... Seriously, if you know that NOAA data are valid all around the world, or if you know another weather webservice (in Europe ?!), please let me know as a comment to this post, I'll test and update the list !

  • Do you read French ?

    Written for SharePoint addicts that can read French.
    I was proud to be a co-writer of this book, and thanks Erol for having invited me ! It has been good experience.

    Title : Microsoft SharePoint Portal Server 2003 et WSS au quotidien
    Authors : Erol Giraudy and its team : Erwann Bizeray, Renaud Comte, Hammou Fadili, Bernard Fedotoff, Benoit Hamet, Yves-Jacques Lamotte, Etienne Legendre, Frédéric Manson, Christophe Metral, Martine Robert.
    Price : 55€
    Where to buy : ESKA, AMAZON.FR, FNAC.COM ... and surely many others.

    Official website (in French of course) : MySPS.info

  • IFilter back too !

    The new Adobe PDF Ifilter is out since last week : find it here !

  • Welcome back !

    Yes, I know ... I've been away for several months ... Near 100 days off ... on holidays and "off SharePoint". But these days I'm back into our favourites products, diving into webpart dev.

    So I think I'll post some dev tips in the next days.

  • Customize Category navigation bar on the SPS home page

    I just discovered this post from Daniel McPherson. It's very useful to know how to change the Category navigation bar on the home page of an SPS portal. I advice you to read his post, event if I give you the tip here : he explains why NOT delete the native topics area.

    1. Open :\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\\SPS\default.aspx
    2. Search for the following string:   <SPSWC:CategoryNavigationWebPart runat="server" id="VerticalNavBar" DisplayStyle="VerticalOneLayer" /> 
    3. Replace it with the following string:   <SPSWC:CategoryNavigationWebPart runat="server" id="NewVerticalNavBar" DisplayStyle="VerticalOneLayer" CurrentCategoryID="<INSERT CAT ID HERE>"/>
    4. Where is equal to the Category ID of the area whose children you wish to display as navigation. To get the Cat ID: Browse to an area, then click on "Change Settings" and copy the string that appears after "CatID=" in the URL. "
  • Customizing templates

    If you don't know it, you can waste a lot !

    When registering new templates in WEBTEMP.XML and WEBTEMPSPS.XML, you have to set an ID greater than 10000 (maybe Microsoft hopes to release a lot of new templates in the SP). And IDs must be different in the two files. For example, you can't have a template id of 10001 in the WSS definitions (WEBTEMP.XML) and another with id 10001 in the SPS areas definitions (WEBTEMPSPS.XML).

    Have a good templating time ! :-)

  • XML Manifest file format for Migrations

    Well, I'm not currently working on SharePoint, that's why my posts are so rare ... But I have a look at what's happening.

    And there it is ! The SPout/SPin manifest file is decribed in this document from Microsoft.

    What to do with it ?

    • Create your own "Exporter" (from any technology) and use SPin to import into SharePoint 2003.
    • Custom the SPout-generated xml file and use SPin to import into SharePoint 2003.

    An alternative (with best and worse points) to the Extractors/Importers.

    Enjoy !

  • Extractor/Importer : migrate content to SharePoint Technologies 2003

    Relaying this post of Renaud Comte.

    Or directly to : GotDotNet

  • Customization

    A lot of posts in the fr and us newsgroups talks about customization.

    Here is a list of web resources to know, that helps considerably during your customization process :

    If I find more, or if you have more, I'll update this list.

  • GUISPin by Renaud Comte

    Once again Renaud Comte, the GUI guy, made a user interface for a console tool. This time it is for SPin, the SharePoint 2003 import tool. Here is a quick overview of the tool.

    Updated : Changed the link to Renaud's blog and updated the link of the tool in the article.

  • Complete migration process with Spin and SPout

    This was appreciated on my old blog, so I put the article here : http://www.sharepointblogs.com/cmetral/articles/371.aspx

    It is a little test of SPin/SPout with a few documents but that can be useful to prepare a bigger migration.

  • SPin tip !

    As it was ask yesterday on the french user group, I rewrite it here ...

    When importing documents in a specific area with the parameter /area, you have to provide the logical relative path to the existing area.

    Explanation : I want to import in myserver>area1>area1child1, I specify "area1/area1child1" and not "http://myserver/area1/area1child1" (that could be logical) or "http://myserver/C3/area1child1" (that is the browser url of the area).

    Enjoy !

  • Welcome in my thoughts

    My name is Christophe Metral, I am 24 years old and whereas I'm french, I work as Software designer at ilem in Geneva, Switzerland. I've been here for 2 years now (that's my first job !), and completed during this period a big project on SharePoint Portal Server 2001. But now it's time to dive into SharePoint Technologies 2003 and migrations ...

    I am a member of the french user group at www.clubsps.org and am active (or try to be) on the french SharePoint newsgroup.

    My hobbies are football (soccer), tennis, ski, Championship Manager (?!?!).

    Well I think it's enough about me for this post.

    I hope you'll enjoy reading me :-))


Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts