Skip to content
Sam Saffron

Writing about software, performance, Ruby, Discourse, and technology.

  • Discourse
  • Ruby
  • MiniProfiler
  • SQL
  • AI

Excluding changes to AssemblyInfo.cs from Subversion

Sam Saffron1 min read

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

Updated February 22, 2019

The conversation

Open in Discuss ↗

Have a thought or a question? Join the discussion below with your community account.