Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Johan 188 posts 380 karma points
    Sep 22, 2011 @ 17:20
    Johan
    0

    MSBuild errors

    I've been trying to get MSBuild to work but i got stuck. I'm using Matt's tutorial. This is the code i have now:

    <?xml version="1.0" encoding="utf-8" ?>
    <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Package">

    <!--
    ****************************************
    * PROPERTIES
    ****************************************
    -->
    <PropertyGroup>
    <PackageVersion>1.0</PackageVersion>
    </PropertyGroup>

    <PropertyGroup>
    <RootDir>$(MSBuildProjectDirectory)</RootDir>
    <BuildDir>$(RootDir)\TempBuild</BuildDir>
    <PackageDir>$(RootDir)\Package</PackageDir>
    </PropertyGroup>

    <!--
    ****************************************
    * TARGETS
    ****************************************
    -->

    <!-- CLEAN -->
    <Target Name="Clean">
    <RemoveDir Directories="$(BuildDir)" Condition="Exists('$(BuildDir)')" />
    <RemoveDir Directories="$(PackageDir)" Condition="Exists('$(PackageDir)')" />
    <MakeDir Directories="$(BuildDir)" />
    <MakeDir Directories="$(PackageDir)" />
    </Target>

    <!-- PREPAIRE FILES -->
    <Target Name="PrepairFiles" DependsOnTargets="Clean">
    <ItemGroup>
    <PackageFile Include="$(RootDir)\Package.xml" />
    </ItemGroup>
    <Copy SourceFiles="@(PackageFile)" DestinationFolder="$(BuildDir)" />
    </Target>

    <!-- MANIFEST -->
    <Target Name="Manifest" DependsOnTargets="PrepairFiles">
    <ItemGroup>
    <ManifestFiles Include="$(BuildDir)\**\*" Exclude="$(BuildDir)\Package.xml" />
    </ItemGroup>
    <ReadLinesFromFile File="$(RootDir)\Readme.txt">
    <Output TaskParameter="Lines" ItemName="Readme" />
    </ReadLinesFromFile>
    <ManifestUpdate ManifestFile="$(BuildDir)\Package.xml"
    WorkingDirectory="$(BuildDir)"
    PackageVersion="$(PackageVersion)"
    Readme="@(Readme->'%(Identity)', '%0a%0d')"
    Files="@(ManifestFiles)" />
    </Target>

    <!-- PACKAGE -->
    <Target Name="Package" DependsOnTargets="Manifest">
    <ItemGroup>
    <PackageFiles Include="$(BuildDir)\**\*.*" />
    </ItemGroup>
    <Package ManifestFile="$(BuildDir)\Package.xml"
    WorkingDirectory="$(BuildDir)"
    OutputDirectory="$(PackageDir)"
    Files="@(PackageFiles)" />
    </Target>

    </Project>

    And when i run it i get this error message:

    D:\Projekt\html5-boilerplate-for-umbraco\Package.build.xml(49,2): error MSB4036
    : The "ManifestUpdate" task was not found. Check the following: 1.) The name of
    the task in the project file is the same as the name of the task class. 2.) Th
    e task class is "public" and implements the Microsoft.Build.Framework.ITask int
    erface. 3.) The task is correctly declared with <UsingTask> in the project file
    , or in the *.tasks files located in the "C:\Windows\Microsoft.NET\Framework\v2
    .0.50727" directory.
    Done Building Project "D:\Projekt\html5-boilerplate-for-umbraco\Package.build.x
    ml" (default targets) -- FAILED.

    I don't really know what I'm doing here. You're free to call me an idiot. You can find the whole project here.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 22, 2011 @ 21:36
    Dirk De Grave
    1

    well, exception is quite clear, there's a reference to a msbuild task but it can't find it.... ManifestUpdate is a msbuild custom task written by Matt, and is included in the uComponents package, so suggest to take a look how it's been done in their build file.

    Anyway, you'll need an extra dll (which is holding the custom msbuild task) and let msbuild know where/how to find that ManifestUpdate build task.

    Start here

    Cheers,

    /Dirkj

  • Johan 188 posts 380 karma points
    Sep 23, 2011 @ 13:54
    Johan
    0

    Thanks for the pointer Dirk!

    Edit: Cool cool cool! Got it working! Double thanks.

Please Sign in or register to post replies

Write your reply to:

Draft