2

I have the following build script, which I run with MSBuild:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Compile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion ="3.5">
<PropertyGroup>
    <BuildDir Condition=" '$(BuildDir)'==' ' ">$(BaseDir)/build</BuildDir>
    <ProdDir >$(BuildDir)/prod</ProdDir>
    <TestDir>$(BuildDir)/test</TestDir>
    <MMC2SourceDir>SteuerungsZugriffTest/mmc2</MMC2SourceDir>
    <UserSourceDir>SteuerungsZugriffTest/user</UserSourceDir>
    <TestXMLDir>$(BuildDir)/test-results</TestXMLDir>
    <SolutionFile Condition=" '$(SolutionFile)'==' ' ">HMI2.0.sln</SolutionFile>"
    <NUnitTest>nunit-console.exe</NUnitTest>
</PropertyGroup>
<Target Name="Prepare">
    <Message Text="Prepare everything" />
    <MakeDir Directories="$(BuildDir)" />
    <MakeDir Directories="$(ProdDir)" />
</Target>
...

When I now start script on the command line:

D:\MyDir>msbuild /property:BaseDir=D:\MyDir MyScript.build

I got the following error on the commandline output:

D:\MyDir>MyScript.build(11,78): error MSB4067: Das <#text>-Element unterhalb des <PropertyGroup>-Elements ist unbekannt.

Which basically means: The element<#text> is an unknown child.

Does anybody have an idea?

Edit: Sorry, I completed now the script

WaltiD
  • 1,932
  • 2
  • 23
  • 25
  • Looks OK at first glance - the error is at line 11 character 78 which I don't think you have included. Can you post more of your script? – GraemeF Jan 19 '10 at 07:16

1 Answers1

4

You have an extra " at the end of this line

<SolutionFile Condition=" '$(SolutionFile)'==' ' ">HMI2.0.sln</SolutionFile>"

It is outside a tag, so it is considered as a text element...

CJBS
  • 15,147
  • 6
  • 86
  • 135
Cédric Rup
  • 15,468
  • 3
  • 39
  • 30