我正在尝试编写一个 Msbuild 脚本,该脚本将检索在颠覆中保存的解决方案到本地路径,然后构建解决方案。
从命令行执行时出现错误 - MSB4060 该元素无法识别,或在此上下文中不受支持。任何指针将不胜感激。
<project name="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003>">
<PropertyGroup>
<RepositoryPath>http://Path<RepositoryPath>
<svnUsername>USERNAME</svnUsername>
<svnPassword>PASSWORD</svnPassword>
<LocalPath>LOCAL_PATH_TO_COMPILE_SOLUTION</LocalPath>
<solutionFileName>SOLUTION_FILENAME</solutionFileName>
</PropertyGroup>
<!--<ItemGroup>
</ItemGroup>-->
<Import Project="C:\Program Files\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<Target Name="GetSource">
<Message Text="Checking out trunk into $(LocalPath)" />
<SvnCheckout RepositoryPath="$(RepositoryPath)"
LocalPath="$(LocalPath)"
UserName="$(svnUsername)"
Password="$(svnPassword)">
<Output TaskParameter="Revision" PropertyName="Revision" />
</SvnCheckout>
<Message Text="Have got revision: $(Revision)"/>
</Target>
<Target Name="Build" DependsOnTargets="GetSource;Clean;" />
<Target Name="Clean">
<MSBuild Projects="$(LocalPath)$(solutionFileName)" Targets="Clean;Rebuild" />
</Target>
</project>