I am provisioning a publishing page as part of a feature and placing a single list view web part on the page (see code below). This all works perfectly sp far.
<Elements>
<Module>
<File Path="default.aspx" Url="BulletinBoard.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE">
<Property Name="Title" Value="Bulletin Board" />
<Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/ListNewsletterStyle.aspx" />
<Property Name="ContentType" Value="Page" />
<Property Name="PublishingPageImage" Value="" />
<View List="Lists/BulletinBoard" BaseViewID="2" WebPartZoneID="Main" WebPartOrder="1">
<![CDATA[
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart,Microsoft.SharePoint,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="Title">Active Announcements</property>
<property name="ChromeType">None</property>
</properties>
</data>
</webPart>
</webParts>
]]>
</View>
</File>
</Module>
</Elements>
The only problem is that each time I redeploy my feature through Visual Studio, the list view web part is duplicated (i.e. another one is added to the web part zone).
This problem only appears to affect web parts with the <View ...> tag. Web parts provisioned with the <AllUsersWebPart ...> tag are not being duplicated.
How do I prevent this?