让 MSBuild 和 MSBuildCommunityTasks (VSS) 协同工作时遇到问题
我正在尝试学习如何使用 VSS 和 MSBuildCommunityTasks 执行某些源代码控制任务,例如如何使用 GetVSS 和 VssLabel 等任务? 文档没有说清楚这一点。 当我用棍子戳它,看看错误消息是否能告诉我任何信息时,我也不太清楚该怎么做。 让我展示一下我正在做的事情和我得到的东西——我希望有人能指出我正确的方向。
项目是使用VS2005用C#编写的。 这是 MSBuild 项目文件源:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<Target Name="GetLatestVersionVSS">
<VssGet DatabasePath="C:\VSS\Astronom_VSS"
Path="$/Astronom_VSS"
LocalPath="C:\VisualStudioSource\AstronomySolution\Astronom" UserName="build" Password="build" />
</Target>
<Target Name="Compile" DependsOnTargets="GetLatestVersionVSS">
<MSBuild Projects="Astronomer.x.csproj" />
</Target>
</Project>
我收到如下错误消息:
Target GetLatestVersionVSS: C:\Documents and Settings\michaelc\My Documents\Visual Studio 2005\Projects\Astronom\Astronomer\msbuild_UseVSS.xml(7,5): error MSB4018: The "VssGet" task failed unexpectedly. C:\Documents and Settings\michaelc\My Documents\Visual Studio 2005\Projects\Astronom\Astronomer\msbuild_UseVSS.xml(7,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.SourceSafe.Interop, Version=5.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. C:\Documents and Settings\michaelc\My Documents\Visual Studio 2005\Projects\Astronom\Astronomer\msbuild_UseVSS.xml(7,5): error MSB4018: Filename: 'Microsoft.VisualStudio.SourceSafe.Interop, Version=5.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ...And so on.
我想到我可能需要在其中放置某种导入项以指向 VSS,特别是指向 Microsoft.VisualStudio.SourceSafe.Interop,但我找不到该名称的 .dll 文件,并且它不在 Visual Studio 中“添加引用”对话框的 .NET 选项卡的组件列表中。
I am trying to learn how to do certain source control tasks with VSS and MSBuildCommunityTasks, like how to use tasks like GetVSS and VssLabel? Docs don't make this clear. And when I poke a stick at it to see if the error messages can tell me anything, it isn't really very clear what to do then, either. Let me show what I'm doing and what I'm getting -- I hope someone can point me in the right direction.
Project is written in C# using VS2005. Here's the MSBuild project file source:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<Target Name="GetLatestVersionVSS">
<VssGet DatabasePath="C:\VSS\Astronom_VSS"
Path="$/Astronom_VSS"
LocalPath="C:\VisualStudioSource\AstronomySolution\Astronom" UserName="build" Password="build" />
</Target>
<Target Name="Compile" DependsOnTargets="GetLatestVersionVSS">
<MSBuild Projects="Astronomer.x.csproj" />
</Target>
</Project>
I get error messages as follows:
Target GetLatestVersionVSS: C:\Documents and Settings\michaelc\My Documents\Visual Studio 2005\Projects\Astronom\Astronomer\msbuild_UseVSS.xml(7,5): error MSB4018: The "VssGet" task failed unexpectedly. C:\Documents and Settings\michaelc\My Documents\Visual Studio 2005\Projects\Astronom\Astronomer\msbuild_UseVSS.xml(7,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.SourceSafe.Interop, Version=5.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. C:\Documents and Settings\michaelc\My Documents\Visual Studio 2005\Projects\Astronom\Astronomer\msbuild_UseVSS.xml(7,5): error MSB4018: Filename: 'Microsoft.VisualStudio.SourceSafe.Interop, Version=5.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ...And so on.
It occurs to me that I might need to put some sort of Import item in there to point to VSS, specifically to point to Microsoft.VisualStudio.SourceSafe.Interop, but I cannot find a .dll file by that name, and it is not in the list of components in the .NET tab of the Add Reference dialog in Visual Studio.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我正在回答我自己的问题。
MSBuildCommunityTasks 需要 Visual Source Safe 2005,它随 VS2005 一起提供。 但是,我们仍在使用 VSS 6.0d,并且 MSBuildCommunityTasks 无法使用它。 任务的开发人员指南指出:
OK, I am answering my own question.
MSBuildCommunityTasks requires Visual Source Safe 2005, which ships with VS2005. We are, however, still using VSS 6.0d, and MSBuildCommunityTasks does not work with it. The developer's guide for the tasks states: