DLLs not being added to source control

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
MattK
Posts: 15
Joined: Mon Jul 21, 2008 8:24 pm

DLLs not being added to source control

Post by MattK » Tue Jul 29, 2008 7:50 pm

When I add a reference to a DLL in VS2008 the DLL is imported into the project along with the .refresh file, however, when I checkin the changes to Vault only the .refresh file is imported (I verified this by looking at the Bin folder of my website with the Vault client).

I imagine this means that if another user sets a working folder and downloads the contents of the website, the DLL file will be missing since only the .refresh file exists, and the refresh file references a DLL on my localhost only.

Is this a bug with Vault or am I doing something wrong? Thank you.

nemoby
Posts: 56
Joined: Mon Jan 10, 2005 4:34 pm
Location: Bellingham WA

Re: DLLs not being added to source control

Post by nemoby » Tue Jul 29, 2008 9:28 pm

A few things:

1. Your BIN and OBJ folders are not kept under source control. Binary format files don't version and since they are by definition not source files, it just doesn't make sense to keep them under source control.
2. You are referencing external assemblies. Since they are external to your project / solution, they cannot be placed under source control.

The best solution is to either:

1. Include the project for your assembly within your existing solution.
2. If these are vendor supplied assemblies or assemblies that you do not have source for, create a folder within your project ("vendor assemblies"), copy the assemblies there and then reference them from your local copy. This makes for a really good solution especially if your assemblies change over time. Now you have a versioned copy that you can manually update within your solution.

MattK
Posts: 15
Joined: Mon Jul 21, 2008 8:24 pm

Re: DLLs not being added to source control

Post by MattK » Tue Jul 29, 2008 10:19 pm

Thank you for your quick reply Andy.

The other .DLL files in my project's BIN folder were added to Vault when I added the entire project via "Add to Vault" in the solution, and if I copy and paste the .DLL and .XML files into the project's BIN folder and check them in Vault handles them. I guess my question is why your IDE client doesn't checkin the .DLL files since they are needed if anyone else wants to set a new working folder and compile the project. This just means that it takes me a little more work since I can no longer do an "Add Reference" on the BIN folder. It is compounded by the fact that I reference over a dozen such files which change frequently. In addition, I prefer to have these DLL's projects in a separate solution due to build times slowing down the current website project.

BTW these DLL files are versioned, we increment the build numbers automatically in VS 2008. It would make sense to keep them under source control if for example you compiled an external DLL which created a new build, you imported that build into your web application, and it turns out that the built DLL has a bug. You could revert to the old DLL using source control while the bug is being fixed, rebuild the app and publish quickly. I was under the assumption that Vault was good for storing files other than source code such as .PSDs, .MDFs and other large files since it uses the binary VDiff algorithm on all files regardless vs. creating a new copy.

Thank you.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: DLLs not being added to source control

Post by Beth » Wed Jul 30, 2008 3:15 pm

I guess my question is why your IDE client doesn't checkin the .DLL files since they are needed if anyone else wants to set a new working folder and compile the project.
Visual Studio actually makes the decision as to what gets sent to Vault as an add and what doesn't. nemoby accurately described what it considered standard. Of course, there are users who put everything in anyway.

When a DLL is being built, it's a bit redundant I think to put both the code that builds it in as well as the .dll. You can do that, but you need to keep them separate then and not have both under the same solution I think.

Vault can store any type of file. Binary files though can't have merges performed on them. If VS makes the decision to send that file to Vault, then Vault will take it, but it will then only allow exclusive checkouts on it.
Beth Kieler
SourceGear Technical Support

Post Reply