views:

589

answers:

3

For one of my ASP.Net site I use AnkhSVN to commit to a VisualSVN Server with a post commit hook to update the live website.

This setup works great for every directory EXCEPT the Bin directory. When I build my solution the dll is placed in the site's /Bin but does not show up in Pending Changes. If I select the dll, right click -> Refresh Status, right click -> Commit... it will be committed, but I cannot commit the dll's in the /Bin with the rest of the site.

What am I doing wrong?

+2  A: 

Visual Studio does not regard the dlls referenced in the project, as source. Thus they will never be checked in, only copied to the bin folder when the site is built.

VS uses the .refresh files to know which dlls are referenced (the content of a .refresh file points to the original dll), and these refresh files are regarded as source and will be checked in. So to make your setup work you will need to build the project before deploying the site.

Imo this kind of task belongs in a build system, like CruiseControl.Net or TeamCity, not in a svn post commit. You can easily set up such a system to monitor your svn repository, have it compile the solution and then, upon a successful build, publish to the live website.

Actually, I would advice against automatically publishing directly to a live website without first publishing to a staging server for test. But you could have your build system do that too.

Peter Lillevold
Opening View -> Pending Changes will immediately list the .refresh files as pending changes.
Sander Rijken
@Sander - the refresh files themselves are regarded as source (since they basically _is_ the reference data VS uses to know what assemblies/projects to...well, reference). So any changes to the references (change in location perhaps) will cause VS to list them as pending...
Peter Lillevold
+1  A: 

Check if the files in your your bin folder are even under version control (you can do an svn add if not). Another possibility is that the files in the bin directory are being ignored by subversion. In that case, you'll have to remove them from the ignore list.

Nader Shirazie
Agree - the files are most likely not in source control and are simply build products.
Critical Skill
A: 

Agree with Nader. Perhaps files are not under source control. Also Suggest you dont include the bin files (as they are really build items) in source control. It is sufficient to have the source code under version control and tag it appropriately once the build is done so you can reproduce the necessary binaries as and when required. If you MUST have the built packages tagged and versioned, then you can run svn status on the build workspace -- it will show up all the files not yet included under source control and you can write a small script to add them all after.

Critical Skill