내가 발견 한 몇 가지 다른 유사한 답변을있는 전체 디렉토리를 복사, 그러나 아무도 내 질문에 응답하지 :MSBuild에서 여기
Copying entire project structure into another directory using afterbuild task
Copy all files and folders using msbuild
을 내가 뭘하려고하는지 :
나는 여러 다른 디렉토리 트리로 복사해야한다. 컴파일시 프로젝트의 장소. 여기 그것이 현재 수행되는 방법입니다
<ItemGroup>
<MediaFiles Include="$(ProjectDir)media\**\*.*" />
<DeployLabel Include="$(ProjectDir)deploy\x">
<Dir>x</Dir>
</DeployLabel>
<DeployLabel Include="$(ProjectDir)deploy\y">
<Dir>y</Dir>
</DeployLabel>
<DeployLabel Include="$(ProjectDir)deploy\z">
<Dir>z</Dir>
</DeployLabel>
</ItemGroup>
<Target Name="GenericDeploy"
Inputs="@(DeployLabel)"
Outputs="%(Identity).Dummy">
<Message Text="Deploying: @(DeployLabel)" />
<Copy SourceFiles="@(MediaFiles)"
DestinationFiles="@(MediaFiles->'$(ProjectDir)deploy%(Dir)media\%(RecursiveDir)%(Filename)%(Extension)')"/>
이 실행하는 척하지만, 복사 아무것도 전혀. %(DeployLabel.Dir)
도 사용하려고했지만 오류가 발생합니다.
xcopy
을 사용하고 싶지 않습니다.이 프로그램이 Windows 설치의 기본 인벤토리에없는 것 같습니다 (내 컴퓨터에는이 프로그램이 없습니다). 또한 나는 고백해야한다, 나는 무엇이 %
thingy가하는 것을 완전히 이해하지 않는다. 처음에 @ 및 %를 보았을 때, Make에서 복사 된 것으로 생각했지만 이제는 의심 스럽습니다 ... ->
이 의미하는 바가 무엇인지에 대한 통찰도 있습니다.이 비밀스러운 이름에 대한 문서를 찾는 것은 매우 어렵습니다.
나에게 잘 보이는 : - - \
\ %를 사용하여 C를 \ TMP \ myFile2.txt. –