28

Is it just me or is the documentation on this project really scarce?

I'm trying to find how to use the FtpCreateRemoteDirectory and FTP functionality in general, but can't seem to find anything.

Googling FtpCreateRemoteDirectory, only shows the project's source code...

Bertvan
  • 4,943
  • 5
  • 40
  • 61

5 Answers5

25

The documentation is like you say really scarce. The best I found is to download the latest source code here : https://github.com/loresoft/msbuildtasks

The latest documentation can also be viewed via GitHub directly without downloading the source: https://github.com/loresoft/msbuildtasks/tree/master/Documentation

If installed using the MSI, you can also look at the XSD found in the installation folder (C:\Program Files (x86)\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.xsd) to at least see which tasks are avaialable to you and the documentation connected with them.

bsara
  • 7,940
  • 3
  • 29
  • 47
Benjamin Baumann
  • 4,035
  • 2
  • 25
  • 35
  • even a search on FtpCreateRemoteDirectory in the .chm produces no results :( – Bertvan Sep 21 '10 at 17:40
  • 1
    But indeed, the source code is the way to go :), thanks! – Bertvan Sep 22 '10 at 04:42
  • 4
    IMHO This should all be on a web page. Too hard to keep track of .chm files. Can't google a .chm file. – NealWalters Jan 11 '12 at 19:18
  • 1
    Perhaps someone could write an MSBuild task that would prevent people from contributing MSBuild tasks that don't have documentation? :-) Of course it would suffer from the chicken / egg paradox, but whatever! – Steve L Jul 22 '14 at 17:06
  • Link to the latest [Overview.html](https://rawgit.com/loresoft/msbuildtasks/master/Documentation/Overview.html) – Geoff Aug 11 '15 at 21:05
9

The latest releases on Github do not include documentation (issue #24).

Older releases on Tigris do include documentation in the form of a CHM file: After installing MSBuild.Community.Tasks.msi from the project download page, the documentation is in the installation folder. The typical path is "C:\Program Files (x86)\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.chm".

Edward Brey
  • 40,302
  • 20
  • 199
  • 253
  • 5
    As of the latest releases of the product the help file is NOT found at the location that you refer to. I would suggest removing your answer or changing it to a correct location. – bsara Apr 25 '13 at 18:32
  • 1
    @Brandon: The installation for version 1.2.0.306 (the latest) still includes the documentation in the same place. Things to check: **1.** Download the binary, not source (i.e. the package without a version number in the name). **2.** Ensure that the documentation feature is enabled during installation (defaults to enabled). **3.** The installation folder varies between systems (e.g. on a typical 32 OS, it's under **C:\Program Files\MSBuild**). – Edward Brey Apr 26 '13 at 11:48
  • 2
    Installed 1.4.0.72 from .msi, no .chm included. – Per Lundberg May 22 '14 at 10:33
  • @PerLundberg: Unfortunately, an [open issue](https://github.com/loresoft/msbuildtasks/issues/24) with the newer GitHub releases is that they don't include documentation. – Edward Brey May 22 '14 at 11:32
8

The documentation is sublime, but missing completely. However, the code is really easy to read - at least for finding out available tasks and their inputs/outputs.

The way I do it:

  1. Install a .NET decompiler like Jetbrains dotPeek (or some other .NET Reflector free clone).

  2. PM> Install-Package MSBuildTasks (from VS) OR
    > nuget install MSBuildTasks (from cmd line)

  3. Open slnDir\.build\MSBuild.Community.Tasks.dll in the above mentioned dotPeek, navigate to namespace MSBuild.Community.Tasks and double-click the task you're interested in.

  4. Profit!

enter image description here

Cristian Diaconescu
  • 34,633
  • 32
  • 143
  • 233
  • 4
    This works indeed, but since it is open source, you can also just look at the source, as stated in the answer? (http://stackoverflow.com/a/3762871/65087) – Bertvan Apr 04 '13 at 17:31
  • In tnis instance I find it quickest to just decompile. All the parts are already on my system (the decompiler and the assembly). It just takes a double-click and I'm in a familiar interface, ready to read the code. I find it harder and slower to get to the same piece of code online (where is the project homepage? Now where is the code hosted? Where's the 'Browse source' button for Github/Codeplex/Bitbucket/etc? Now where's that file I need?) – Cristian Diaconescu Apr 04 '13 at 21:31
  • Good point. Upvote for you :) – Bertvan Apr 05 '13 at 05:05
3

Came across this as I was looking for the same info, so may as well add an example of a complete MSBuild target which creates an FTP folder and then copies the contents to the new location. NB the example uploads to a secure site, so you may need to change the port number to suit your situation.

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />

  <Target Name="MSBuildFTP">    

    <PropertyGroup>
        <ftpHost>Your Host</ftpHost>
        <ftpUser>Your username</ftpUser>
        <ftpPass>you guessed it.. your password</ftpPass>
    </PropertyGroup>

    <Message Text="Create the directory if it does not exist - FtpUploadDirectoryContent fails if the dir does not exist" /> 
    <FtpCreateRemoteDirectory 
        ServerHost="$(ftpHost)"
        Port="21"
        Username="$(ftpUser)"
        Password="$(ftpPass)"
        RemoteDirectory="SSL/secure/"
        />

    <Message Text="Copy the contents of our directory to the ftp location" /> 
    <FtpUploadDirectoryContent
        ServerHost="$(ftpHost)"
        Port="21"
        Username="$(ftpUser)"
        Password="$(ftpPass)"
        LocalDirectory="deployment"
        RemoteDirectory="SSL/secure"
        Recursive="false"
        />
  </Target>
</Project>
Fetchez la vache
  • 4,940
  • 4
  • 36
  • 55
1

You can use the XSD to check available options as well.

Cheers.

Eddietec
  • 351
  • 2
  • 4