Joe Flateau
Joe Flateau

Reputation: 1225

Visual Studio Source Control (AnkhSVN) & Bin directory for ASP.Net site

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?

Upvotes: 1

Views: 2800

Answers (4)

Alexander Molodih
Alexander Molodih

Reputation: 1936

AnkhSVN doesn't look for libraries and some additional files!

But you can add additional files into SVN in hand mode:

  • Coose View -> Working Copy Explorer

  • Find files that you like to add, and click Add:

enter image description here

  • Press ok!

  • And now you can see you library in "Pending Changes" window.

Upvotes: 2

Critical Skill
Critical Skill

Reputation: 2539

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.

Upvotes: 0

Nader Shirazie
Nader Shirazie

Reputation: 10776

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.

Upvotes: 2

Peter Lillevold
Peter Lillevold

Reputation: 33910

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.

Upvotes: 3

Related Questions