In my development I just recently noticed the attribute "doGUIDFixUp = TRUE|FALSE".

I tried to google more about this attribute but couldn't find anything useful. The MSDN site doesn't explain this either.

Can someone shed some light as to what this field would be used for?


Setting DoGuidFixUp="TRUE" for a <File> tag allows you to use tokens {$ListId: WebRelativeListUrl;} inside the deployed file. Those tokens will be replaced with the GUID of the list defined by the "WebRelativeListUrl" URL. Very useful when deploying webparts, pages with webparts, etc.


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/" >
  <Module Name="Calendar" List="113" Url="_catalogs/wp">
    <File Path="Calendar\Calendar.webpart" Url="Calendar.webpart" Type="GhostableInLibrary" DoGUIDFixUp="TRUE" >
      <Property Name="Group" Value="Custom" />

This code will deploy "Calendar.webpart" file to the site webparts gallery.

Inside the Calendar.webpart, I have the following code:

  <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
      <type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
      <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
        <property name="ListName" type="string">{$ListId: Lists/Calendar;}</property>

After it is provisioned, I can see the token is replaced with correct list GUID.

  • Very useful. Do you know the exhaustive list of working tokens?
    – Steve B
    Jul 1 '15 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.