Can I replace TurtleTasks in the AnkhSvn build

68 Views Asked by At

I am trying to build AnkhSVN based on the branch by Simonp22.

The solution includes the MSBuild target QQn.TurtleTasks.targets which contains two tasks:

  • QQn.TurtleTasks.CachedDownloadAndExtract
  • QQn.TurtleTasks.ApplyXslTransform

The targets file is imported into four projects in the solution.

The DLL QQn.TurtleTasks.dll is included in the repository (as a binary file). However, it targets .NET Framework 3.5, which I previously did not have installed on my computer.

I would like to get rid of the reference to Framework 3.5, so if possible I would like to replace or remove this reference.

It is not obvious to me, what these tasks are doing and what role they play in the build process.

Can anybody explain

  • What these tasks are doing?
  • What is QQn.TurtleTasks? Is it a project which still exists?
  • Is there a way to replace it?

This is the targets file:

<?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>

Sorry, this is not directly a programming question, but it is a concrete problem related to programming and I think it can be answered. That is why I am asking on Stack Overflow.

1

There are 1 best solutions below

0
LoLance On

Can I replace TurtleTasks in the AnkhSvn build. What is QQn.TurtleTasks? Is it a project which still exists?

I'm afraid no. That QQn.TurtleTasks is not a open-source project like AnkhSVN repos itself, I would think it's one old, Internal-use project, for this, you have to contact the authors of the AnkhSVN to get source project if it exists.

What these tasks are doing?

Take Ankh.Services.csproj as example, we can see something like:

<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>

And the DependencyDownload Item is something that will be used by DownloadDependencies target here.

According to the content of these two files: QQn.TurtleTasks.targets calls DownloadDependencies target=>CachedDownloadAndExtract task. And DependencyDownload item is the input of CachedDownloadAndExtract task(C# class that Implements Itask).

So for this task it will try to download xx.zip file from specific Url like https://sharpsvn.open.collab.net/files/documents/180/12884/ and cache them. But those real logic are hidden in the assembly QQn.TurtleTasks.dll.

So i think if you want to replace them, you have to contact the user to get source code of that QQn.TurtleTasks assembly or install .net framework 3.5 in your machine. Not a good suggestion, but after my check it's a quite old repos from VS2008(VS2005?), for such old project, .net 2.0 and 3.5 framework can help resolve many unknown issues.