Excluding changes to AssemblyInfo.cs from Subversion
almost 18 years ago
During our internal development we have a special VS plug-in that mucks around with the AssemblyInfo.cs file during the build.
The result was that the check-in window for tortoisesvn was quickly filling up with changed AssemblyInfo.cs files no one ever wants to check-in.
This problem is “described”:http://subversion.tigris.org/faq.html#ignore-commit in the Subversion FAQ.
My workaround:
-
Rename AssemblyInfo.cs to AssemblyInfo.cs.template in the Subversion repository
-
Add a batch file named “prebuild.bat” to the root of the project, with the following contents:
copy %1\Properties\AssemblyInfo.cs.template %1\Properties\AssemblyInfo.cs
- Add a Pre-build event to the project:
call "$(ProjectDir)prebuild.bat" "$(ProjectDir)"
- Add a subversion ignore (svn:ignore) for AssemblyInfo.cs
Handy to know now that we have 8 of these in our solution. I’ve been going through and unchecking each for every SVNCommit.