【问题标题】:Having trouble getting MSBuild and MSBuildCommunityTasks (VSS) to work together无法让 MSBuild 和 MSBuildCommunityTasks (VSS) 协同工作
【发布时间】:2008-10-15 17:37:06
【问题描述】:

我正在尝试学习如何使用 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>

我收到如下错误消息:

目标 GetLatestVersionVSS: C:\Documents and Settings\michaelc\My Documents\Visual Studio 2005\Projects\Astronom\Astronomer\msbuild_UseVSS.xml(7,5): 错误 MSB4018:“VssGet”任务意外失败。 C:\Documents and Settings\michaelc\My Documents\Visual Studio 2005\Projects\Astronom\Astronomer\msbuild_UseVSS.xml(7,5): 错误 MSB4018:System.IO.FileNotFoundException:无法加载文件或程序集 'Microsoft.VisualStudio.SourceSafe.Interop,版本 = 5.2.0.0,文化 = 中性,PublicKeyToken = b03f5f7f11d50a3a' 或其依赖项之一。该系统找不到指定的文件。 C:\Documents and Settings\michaelc\My Documents\Visual Studio 2005\Projects\Astronom\Astronomer\msbuild_UseVSS.xml(7,5): 错误 MSB4018:文件名:'Microsoft.VisualStudio.SourceSafe.Interop,版本 = 5.2.0.0,文化 = 中性, PublicKeyToken=b03f5f7f11d50a3a' ...等等。

我突然想到,我可能需要在其中放置某种导入项以指向 VSS,特别是指向 Microsoft.VisualStudio.SourceSafe.Interop,但我找不到该名称的 .dll 文件,并且它不在 Visual Studio 中“添加引用”对话框的 .NET 选项卡的组件列表中。

【问题讨论】:

    标签: msbuild visual-sourcesafe


    【解决方案1】:

    好的,我正在回答我自己的问题。

    MSBuildCommunityTasks 需要 VS2005 附带的 Visual Source Safe 2005。但是,我们仍在使用 VSS 6.0d,并且 MSBuildCommunityTasks 无法使用它。任务的开发者指南指出:

    http://msbuildtasks.tigris.org/ 的开发人员指南 ==================================================== === 构建环境先决条件 ------------------------------ - .NET2.0 - 微软构建;通常已作为 .NET2.0 的一部分安装, 例如在 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe - NUnit 2.2.X (http://www.nunit.org/); 运行测试所必需的 - Microsoft Visual SourceSafe(R) 2005; 库 Microsoft.VisualStudio.SourceSafe.Interop 被引用 - NDoc 1.3 (http://ndoc.sourceforge.net/) 额外配置 NDoc 以使用 .NET2;看 http://ndoc.sourceforge.net/wiki/dotNet_2.0_Support - Microsoft Visual Studio 2005 作为 IDE

    【讨论】:

      猜你喜欢
      • 2018-07-24
      • 2016-06-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-14
      • 2010-10-27
      • 2016-01-28
      相关资源
      最近更新 更多