3

我有几个包含 SVN 外部的 Visual Studio Web 应用程序项目。当一个新文件被添加到一个外部模块时,VisualSVN 将它带到文件系统中,但不会将它添加到 Visual Studio 项目中;它必须手动添加。

我可能会编写一个宏来自动化这个过程,我想知道我是否可以通过以下任一方式使其成为一步过程:

  1. 让宏启动 VisualSVN 更新,然后执行工作(问:是否可以从宏触发 VisualSVN 更新?)
  2. 连接到来自 VisualSVN 的假设“更新后”事件以触发宏来完成工作(问:这样的事件是否存在?)
4

1 回答 1

1

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.

于 2009-12-21T20:50:59.453 回答