Recently, our team encountered a peculiar issue with TortoiseSVN (version 1.14.x) where committed ASP.NET files (.aspx, .aspx.cs, .aspx.designer.cs) would appear in repository browser but fail to update in some team members' working copies. The repository runs on SVN 1.4.6 via svn:// protocol on Windows Server 2003.
The problem typically manifests when:
- Developer A commits a complete ASP.NET page (all three file types)
- Developer B performs SVN update
- The files are missing from Developer B's working copy despite being visible in repo-browser
- Manual "Copy to working copy" operation triggers add conflicts
After analyzing logs and testing various scenarios, we discovered this occurs due to:
1. Subversion 1.4.x metadata handling limitations 2. TortoiseSVN caching behavior with Visual Studio integration 3. Case sensitivity issues in Windows environment
Immediate Solution:
svn cleanup svn revert --recursive . svn update --force
Permanent Fix: Upgrade to Subversion 1.8+ server and ensure all clients use TortoiseSVN 1.8+ with the following configuration:
[auto-props] *.aspx = svn:eol-style=native;svn:mime-type=text/html *.aspx.cs = svn:eol-style=native *.aspx.designer.cs = svn:eol-style=native
Create a pre-commit hook script (pre-commit.bat) to validate file additions:
@echo off setlocal svnlook changed -t "%TXN%" "%REPOS%" | findstr /i "\.aspx$ \.aspx\.cs$ \.aspx\.designer\.cs$" || exit 0 svnlook dirs-changed -t "%TXN%" "%REPOS%" > changed-dirs.txt for /f "delims=" %%d in (changed-dirs.txt) do ( svnlook tree -t "%TXN%" "%REPOS%" "%%d" | findstr /i "\.aspx \.aspx\.cs \.aspx\.designer\.cs" > file-check.txt set /a count=0 for /f %%i in (file-check.txt) do set /a count+=1 if !count! neq 3 ( echo Error: Incomplete ASP.NET page submission in %%d >> %TEMP%\svn-hook.log exit 1 ) ) exit 0
Add this to your .csproj file to ensure design files stay synchronized:
<ItemGroup> <Compile Include="*.aspx.cs" DependentUpon="*.aspx" /> <Compile Include="*.aspx.designer.cs" DependentUpon="*.aspx" /> </ItemGroup>
I've encountered this frustrating scenario multiple times in team development environments: a colleague commits files to our SVN repository (visible in repo-browser), but when I update my working copy, those files simply don't appear. This particularly affects ASP.NET web projects with the classic trio: .aspx
, .aspx.cs
, and .aspx.designer.cs
files.
The problem typically manifests like this:
1. Developer A commits new web form files 2. Developer B runs "SVN Update" 3. The files don't appear in Developer B's working copy 4. Attempting to manually copy files from repo-browser causes conflicts
After extensive troubleshooting, I've identified several potential culprits:
- SVN 1.4.6 Server Version: Older versions had known issues with file propagation
- File Locking: Visual Studio might hold locks on designer files
- Case Sensitivity: Windows vs. SVN case sensitivity mismatches
- Working Copy Corruption: Local .svn metadata getting out of sync
Here's what worked for our team:
1. Clean Update Procedure
svn cleanup svn revert -R . svn update --force
2. Manual File Recovery
When the above fails, try this PowerShell script to identify missing files:
$repoUrl = "svn://your-repository/Code/Website" $localPath = "C:\dev\website" $remoteFiles = svn list $repoUrl --recursive $localFiles = Get-ChildItem $localPath -Recurse | Where {!$_.PSIsContainer} foreach ($file in $remoteFiles) { if (!(Test-Path "$localPath\$file")) { Write-Host "Missing file: $file" svn export "$repoUrl/$file" "$localPath\$file" --force } }
3. Upgrade Your SVN Stack
Consider upgrading both server and clients to at least SVN 1.8+. The newer versions handle file propagation much better.
- Always close Visual Studio before major SVN operations
- Implement pre-commit hooks to validate file permissions
- Regularly run
svn cleanup
on working copies - Consider migrating to SVN 1.14+ or alternative version control systems
As a last resort, this nuclear option works (but loses local changes):
rm -rf /path/to/working_copy svn checkout svn://your-repository/Code/Website