I have a weird issue with deployment of a WSP file.
A little background info:
- The Visual Studio solutions consists of 28 projects (don't ask... I inherited it :-)) of which 26 files generate a WSP file.
- The project was started on SharePoint 2007 but is now being upgraded to SharePoint 2010
- All projects build their WSP files using
stsdev. Converting the projects to the SharePoint 2010 project templates will take too much time. - TFS is used for version control and ALM
- Nightly (debug) build is in place to build all the WSP files.
- From the nightly build, a PowerShell script is started which initiates
Update-SPSolutionfor each WSP file and waits until the updating is completed before starting the update process for the next file.
In one of the projects, several application files are deployed to a sub folder of _layouts, including a custom master page used exclusively by the application pages. The master page is not deployed to the Master Page Gallery and is not used anywhere else.
Last week, a rather peculiar problem started to show up: the last character of the master page was appearing twice. At first I thought this was a mistake in the master page (it had recently been edited) so I opened up Visual Studio, got the latest version, went into the master page and looked at the last line: </HTML> which was followed by a new line. The version that was deployed said </HTML> followed by a new line and then >. Weird.
Since I have two test environments that are both updated nightly, I looked at both the environments and discovered that both had the same error in the same file. As the error was not in TFS, I turned to the build server and investigated the files in the Sources folder, they were fine. I looked into the built WSP files, they were fine as well.
I have tried manually running the Update-SPSolution command but the issue remained. Redeploying (retract/delete/install/deploy) did not resolve the issue either. I've checked the properties of the master page file on the disk drive, but couldn't find any indication that the file might have been changed by someone else ("Last Modified" time was equal to the other files, no changes in permissions, etc).
Yesterday, I made a small change to the master page, hoping to trick the job that does the actual solution deployment into re-deploying the file. I made these changes:
- I added a space on top of the file. It started with
<%@Masterwhich I changed into<%@ Master - I removed the newline at the bottom of the file
This morning, when the nightly deployment had ran, I looked at the bottom of the file. To my amazement, it read: </HTML>ML>
The issue occurs on two separate but identical SharePoint environments. Both environments have been configured by using scripts and are up onto the same SharePoint patch level: SP 2010 + Service Pack 1 + the August cumulative update (14.0.6126.5000).
I think I have tried almost everything. Can anyone give me some clues on how I can possibly resolve this very peculiar issue?