views:

389

answers:

1

I have two web projects, both these projects share client-side JavaScript currently residing as almost identical copies in both projects. I say almost because I'm clearly having versioning problems with these files.

I've managed to put the files in a solution folder and created links to them from my projects and this works when I publish the projects. However, when I run the WebDev server locally these files are not hard file system links? They seem to be maintained within the Visual Studio project as a reference only.

The problem is that the WebDev server will make a request to the presumable valid location of the file but it will not find it there because it doesn't exist as a physical file at that location.

Anyone know how to work around this?

+1  A: 

If you use SVN, you could have the files managed as externals. Basically this will allow you to have the shared files maintained in one location, and have an external (physical file) reference to them.

http://svnbook.red-bean.com/en/1.0/ch07s03.html

Dave the Ninja

Dave The Ninja
I do use SVN, but I still make changes to these files locally between each commit, will it solve the problem that I'm editing the same files twice? (Without a commit/update inbetween?)
John Leidegren
You would have:-- Solution A-- Solution B-- Shared SolutionWhen editing the shard files do it in the one place then commit. Afterwards Update Solution A and B and the externals will be updated.
Dave The Ninja
OK, unfortunately that will not solve my problem, but thanks anyway. I might not want to commit these changes while trying things out locally, if I commit to the head branch it could have undesirable results, branching is too much hassle to I really wanna keep it locally.
John Leidegren