• 29Jun

    It took way longer to set up an msbuild using the nant msbuild task than it should have.

    I started out with:

    <msbuild project="Solution.sln">
    <property name="Configuration" value="Release"/>
    <property name="OutDir" value="${dir.output}"/>
    </msbuild>

    I got a error message saying that the OutDir needed to end in a slash. So I changed it to this:

    <msbuild project="Solution.sln">
    <property name="Configuration" value="Release"/>
    <property name="OutDir" value="${dir.output}\"/>
    </msbuild>

    Which lead to the not so helpful error message ‘illegal characters in path’. Only the path was as simple as can be without any possible illegal characters or spaces or anything. After hours of searching I found a comment at the bottom of this blog post with the trick. I need two slashes at the end of the path!

    Here is the code that worked:

    <msbuild project="Solution.sln">
    <property name="Configuration" value="Release"/>
    <property name="OutDir" value="${dir.output}\\"/>
    </msbuild>

    Obvious, right? ;-)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>