views:

55

answers:

1

I have installed VS2010. I have a simple .build file which contains this.

<?xml version="1.0"?>
<project name="system" default="build">
    <target name="build">
        <exec program="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe">
            <arg value="C:\System\system.build" />
        </exec>
    </target>
</project>

When I try to build the project by typing C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe system.build, I received this error.

C:\System\system.build(2,1): error MSB4068: The element is unrecognized, or not supported in this context.

I'm interested in recommendations or suggestions.

A: 

Dont forget to read your question after you post (the sample was missing which is why you got no quick answers)

You're missing the xmlns on the project node - see a csproj for the required ns bit.

Also, it normally doesn't make much sense to run msbuild from within msbuild as you've done, but then you knew that! (There's an MsBuild task too, which is generally what you want if you want to nest invocations)

Ruben Bartelink