This drove me mad! I created a couple of custom Site Definitions and had a matching webtemp*****.xml file. Or so I thought! But I had made a typo and a Site Definition which I had created using the Publishing Provisioning Assembly was being referenced by another Site Definition.  A Site Definition which uses the Provisioning Assembly doesn’t actually have a physical onet.xml file.  Rather than being told my Site Definition configuration was wrong I got this error.
 
"A list, survey, discussion board, or document library with the specified title already exists in this Web site.  Please choose another title"
 
After a couple of hours going bonkers, I finally realised my mistake, and changed the webtemp****.xml file to correctly point to the relevant Site Definition.
 
Moral of the tale is cross check, then double check,  your custom webtemp.xml and your custom SiteDefintions!
 
Cheers
 
Dave Mc

12 responses

  1. I want to add this because after reading this post it was not clear 100% to me:

    “correctly point to the relevant site definitions”

    Click on onet.xml and go to properties window.
    Check (expand) “Deployment location” property and check/change the Path!

    ALSO do this for the .aspx file

    In my case, after changing the name “sitedefinition” (default given when you create a project of type sitefinition) to the name i wanted (being “magicalsitedefinition”) the Path under properrty “deployment location” did not change so i had to do that manualy!

  2. Where can I find this webtemp.xml and onet.xml ?

    1. Hi Kevin,

      webtemp****.xml files you will find under C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML and the matching ONET.XML fiels you will find under C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\SiteTemplates

      Cheers

      Dave Mc

      1. Hi Dave,
        Thanks a lot for your quick reply. I don’t understand what to do next. Sorry I just learn SharePoint this month. Could you elaborate it a little bit what to do next ? I don’t know what does it mean ” webtemp****.xml file to correctly point to the relevant Site Definition.” and also not clear about what to do with onet.xml.
        Thanks in advance.

      2. OK. There are a number of XML files in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML folder which all begin with the string “webtemp”. If you look inside the XML files you will see that are a number of elements. The Name attribute of the element refers to a a folder under the following path C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\SiteTemplates. If you look inside each of these folders (except a couple) you will see a folder called XML and within that folder there is a file called ONET.xml. This ONET.XML file is what is known as a Site Definition file, and it contains all the information for SharePoint to create a Site. When you go to “Create Site” link in SharePoint, the list of possible sites comes from an aggregation of all the available webtemp***.xml files elements. When you choose a site to create and click OK, it uses the ONET.XML file to actually create the site you want. Does that help? For more information look at http://msdn.microsoft.com/en-us/library/ms447717.aspx
        Cheers

        Dave Mc

  3. I met this problem and solved it by assigning the following attribute values

    The Project Title and and Configuration Name in onet.xml and the Template Name in the webtemp_****.xml is the same as the name assigned after the underscore in
    webtemp_****.xml filename.

    1. Thank you!!!

    2. This did the trick for me. “Each Template element specifies a unique ID and a name that corresponds to a site definition subfolder within the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\SiteTemplates folder.”

      Reference: https://msdn.microsoft.com/en-us/library/ms447717.aspx

  4. This can be challenging is some cases. What worked for me was to rename the existing SiteAssets folder (which was deployed as a solution package, if you don’t see it in SharePoint Designer or it is not accessible, try the all files tab and highlight the row,. Don’t click the folder name, just the row) then activate the site (not site collection) WIKI page feature. Then in SharePoint designer rename the new SiteAssets folder, and change the deployed SiteAssets folder back to “SiteAssets”. Cleanup the renamed new SiteAssets folder and you should be ready to go.

    1. This worked for me as well. Thank you so much 🙂

  5. You saved my day
    thanks a lot !

Leave a reply to dckline Cancel reply

The Blog

Dave Mc muses about history, travel, writing, coaching, astronomy, technology and life, family and the world around us. You may agree with his opinions, you may not, that’s life …