views:

159

answers:

3

I have an assembly I need to reference in a website project in Visual Studio 2005. I have in the solution a folder called Assemblies in which all third-party assemblies reside. I can right click the website project in the Solution Explorer and select "Add Reference..." and navigate to the assemblies folder to get the assembly. Once I do that the project builds properly.

I then go to commit the change to the subversion repository and it claims there are no changes.

Naturally, if I get a copy of the source tree on another machine it won't build because it isn't referencing the assembly.

What am I missing? I feel it should be obvious, but it isn't.

A: 

This isn't meant to sound like a silly answer: have you hit "Save All"? I've had a few cases where Visual Studio hasn't saved everything even when I'd have expected it to.

Closing VS down completely is a good indication that it's not holding on to anything in memory :)

In fact, that's a good test - if you close VS and then reopen it, then rebuild from scratch, does it still build?

Jon Skeet
Yes - I've hit "Save All" as I've seen that problem in the past too.
Colin Mackay
Just tried closing VS2005 down. No file changes according to Tortoise SVN. Just re-opening it now... [It's a large solution]
Colin Mackay
A: 

If you close the project, does it warn you of unsaved changes?

References in a website project are stored in the web.config in system.web/compilation/assemblies, so you can always add them manually.

Richard Szalay
+1  A: 

It looks like the issue is related a "curiosity" of website projects. When you reference external assemblies a .REFRESH file is created for each referenced assembly. If these .REFRESH files are not being versioned in the source control system then when the solution is pulled onto another machine it cannot find the assemblies. Once I added the .REFRESH files to the source control the solution transfers between machines properly.

This blog post gives more information on what is going on: http://monsur.xanga.com/437206798/dllrefresh-and-aspnet/

Colin Mackay