我正在尝试基于branch by Simonp22构建AnkhSVN。
该解决方案包括MSBuild目标QQn.TurtleTasks.targets,其中包含两个任务:
目标文件被导入到解决方案中的四个项目中。
DLL QQn.TurtleTasks.dll包含在存储库中(作为二进制文件)。但是,它的目标是。NET Framework 3.5,以前我没有在计算机上安装它。
我想摆脱对Framework 3.5的引用,因此,如果可能的话,我想替换或删除此引用。
对我来说,这些任务在做什么以及它们在构建过程中起什么作用并不明显。
任何人都可以解释
这是目标文件:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="../tools/Ankh-Common.targets" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{874C0358-E7DD-42DA-BF07-58198B41FD25}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>TestUtils</RootNamespace>
<AssemblyName>TestUtils</AssemblyName>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
<SccProjectName>Svn</SccProjectName>
<SccLocalPath>Svn</SccLocalPath>
<SccAuxPath>Svn</SccAuxPath>
<SccProvider>SubversionScc</SccProvider>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="ICSharpCode.SharpZipLib">
<HintPath>..\tools\turtletasks\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.Data">
<Name>System.Data</Name>
</Reference>
<Reference Include="System.XML">
<Name>System.XML</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ProcessReader.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Zip.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
对不起,这不是直接的编程问题,而是与编程相关的具体问题,我认为可以回答。这就是为什么我要问堆栈溢出的原因。
我可以替换AnkhSvn版本中的TurtleTasks吗?什么是QQn.TurtleTasks?它仍然存在吗?
恐怕不行。 QQn.TurtleTasks
不是像AnkhSVN
回购本身那样的开源项目,我认为这是一个旧的内部使用项目,为此,您必须与AnkhSVN的作者联系以获取源项目(如果存在)。
这些任务在做什么?
以Ankh.Services.csproj为例,我们可以看到类似的内容:
<ItemGroup>
<DependencyDownload Include="SSvn-1.9005.3940.224.zip">
<Url>https://sharpsvn.open.collab.net/files/documents/180/18649/</Url>
<TargetDir>..\autolib</TargetDir>
<Version>1</Version>
<Visible>false</Visible>
</DependencyDownload>
<DependencyDownload Include="SGit-0.2401.1116.230.zip">
<Url>https://sharpsvn.open.collab.net/files/documents/180/12884/</Url>
<TargetDir>..\autolib</TargetDir>
<Version>1</Version>
<Visible>false</Visible>
</DependencyDownload>
</ItemGroup>
[DependencyDownload
项目是DownloadDependencies
目标here将使用的项目。
根据这两个文件的内容:QQn.TurtleTasks.targets
调用DownloadDependencies
target => CachedDownloadAndExtract
任务。 DependencyDownload
项目是CachedDownloadAndExtract
任务(实现Itask的C#类)的输入。
因此,对于此任务,它将尝试从特定的网址(如xx.zip
)下载https://sharpsvn.open.collab.net/files/documents/180/12884/
文件并对其进行缓存。但是那些真正的逻辑隐藏在程序集QQn.TurtleTasks.dll中。
因此,我想如果要替换它们,则必须与用户联系以获取该QQn.TurtleTasks
程序集的源代码,或者在计算机中安装.net framework 3.5。这不是一个好的建议,但经过我的检查,它是来自VS2008(VS2005?)的一个很旧的存储库,对于这样的旧项目,.net 2.0和3.5框架可以帮助解决许多未知问题。