...">

MSBuild error while creating <project> unrecognized

I installed VS2010. I have a simple .build file that 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 a project by typing C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe system.build, I got this error.

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

I am interested in recommendations or suggestions.

+3
source share
2 answers

, , - , msbuild , ant/nant. , xmlns, . MSbuild - . . :

<?xml version="1.0"?>
<Project name="system" default="build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <Target Name="build">
        <MSBuild Project="C:\System\system.build"/>
    </Target>
</Project>
+3

( , )

xmlns node - . csproj ns.

, msbuild msbuild, , ! ( MsBuild, , )

+1

Source: https://habr.com/ru/post/1758667/


All Articles