Possible Duplicate:
How to update custom master page and page layout, which is already deployed
I have my custom masterpage in my visual studio solution and first time I deployed it worked fine. But since my masterpage now is used by all pages I can't simply update it and deploy again. If I have IgnoreIfAlreadyExist="False" then the deployment fails because it can't deleted it, if I have it set to True, well, nothing happens. I guess I could use a feature event receiver and set it to v4.master temporarily but I don't like that solution and how would you go about all page layouts? I don't want to have to upload them manually to the page layout gallery.
Thanks in advance.
Edit:
My module file for masterpage looks like:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="Masterpage" List="116" Url="_catalogs/masterpage" xmlns="http://schemas.microsoft.com/sharepoint/" RootWebOnly="True">
<File Path="Masterpage\National.master" Url="National.master" Type="GhostableInLibrary">
<Property Name="Title" Value="National.master"/>
<Property Name="MasterPageDescription" Value="National.master"/>
</File>
</Module>
</Elements>
But the code:
Module module = (from m in xml.DescendantsAndSelf()
.Where(m => m.Attribute("Path") != null)
select new Module
{
ProvisioningUrl = m.Attribute("Url").Value,
PhysicalPath = Path.Combine(featureDir, m.Attribute("Path").Value),
Files = (from f in m.Elements(xmlns.GetName("File"))
select new Module.File
{
Name = f.Attribute("Url").Value,
Properties = (from p in f.Elements(xmlns.GetName("Property"))
select p).ToDictionary(
n => n.Attribute("Name").Value,
v => v.Attribute("Value").Value)
}).ToArray()
}).First();
Contains no file so the loop is not run after, am I missing something in my elements.xml file here?
Thanks in advance.