2017-04-05 7 views
0

monodevelop 5.9.6에서 xbuild 12를 사용하고 있습니다. 예, 오래되었습니다. 아니, 업그레이드 할 수 없습니다. :)xbuild로 파일에 날짜 쓰기

현재 날짜를 빌드하는 파일에 쓰고 싶습니다. 내가 monodevelop에서 그것을 빌드 할 때

<Target Name="AfterBuild"> 
    <WriteLinesToFile File="$(OutputPath)\version.txt" Lines="$([System.DateTime]::Now.ToString())" Overwrite="true" /> 
</Target> 

는 그러나, 나는이 오류가 : 나는 인터넷 검색을 MSBuild에 의해, 이런 식으로 뭔가를 설정 한 나는 운 것 같은

Error: Error executing task WriteLinesToFile: Error converting Property named 'Lines' with value '$([System.DateTime]::Now.ToString())' to type Microsoft.Build.Framework.ITaskItem[]: The requested feature is not implemented. (Server) 

그래서 보인다 ? xbuild가 이것을 할 수있는 기능적인 방법이 있습니까? 가급적 사용자 지정 서식을 사용하는 것이 좋습니다. 내가 사용할 수있는 하나의 대체 도구는 대신 작은 파이썬 스크립트를 실행하지만 Rube Goldbergy를 시작합니다.

답변

1

이 버전은 속성 기능을 지원하지 않습니다. Mac/Linux에서는 다음을 사용할 수 있습니다.

<Target Name="AfterBuild"> 
    <Exec Command="date > $(OutputPath)\version.txt" /> 
</Target>