views:

137

answers:

2

I have several Visual Studio web application projects that include SVN externals. When a new file is added to an external module, VisualSVN brings it down to the file system, but doesn't add it to the Visual Studio project; it has to be manually added.

I might write a macro to automate this process, and I'm wondering if I can make it a one-step process by either:

  1. Having the macro initiate the VisualSVN update, then do the work (Q: Is it possible to trigger a VisualSVN update from a macro?)
  2. Hooking into a hypothetical "post-update" event from VisualSVN to fire a macro to do the work (Q: Does such an event exist?)
+1  A: 

I assume you are currently working like this: your "external modules" are just a loose collection of source files without a project file. Whenever a source file is added, you update all your application project files by adding the new source file, so that it is compiled into all the application assemblies.

I think you are doing it wrong. Your project solution file should contain a reference to a separate visual studio project file for each external. Each source file should be compiled into exactly one assembly.

For example, you might have a C# library shared between multiple web applications. This library has its own .csproj project file, which lives in the external location. If a source file is added to the library, the .csproj is updated. The updated .csproj file is then pulled it via an svn:externals declaration when you update your project.

Wim Coenen
Thanks. For the purposes of this question, can we take this architecture as a given? There are a number of reasons why this pattern works better for us than one-project-per-module, which I'd be happy to go into elsewhere.
Herb Caudill
Where is "elsewhere"?
Wim Coenen
@wcoenen - maybe in this question: http://stackoverflow.com/questions/530062/is-wcsf-for-me
Herb Caudill
A: 

Sorry to ask so long after the last answer but have you found a solution for this problem, because we currently have a similar concern on our project. I'd be glad to know how you did?

thanks (and sorry as well to use the answer functionality I couldn't add comment to you question)

djo0012
Hi - we've never gotten around to automating this after all. We have a macro that does this and we just manually run it if files have been added to a dependent module.
Herb Caudill