1

In project i have as normal files as links (shortcuts) to existing file:

http://i.imgur.com/UmXPyNY.jpg

In post-build event i want to copy all files, including links (but as real file) to other directory, for example:

"%RELEASEPATH%\Code\"

Using default xcopy command it do copy all files + directory, but not links:

xcopy /E /Y /R "$(ProjectDir)Code" "%RELEASEPATH%\Code\"

If there a way to copy linked files (as real files) with xcopy as well?

Ony
  • 399
  • 6
  • 16

1 Answers1

0

I am not sure of xcopy, but if all you want is for copying the link file to the folder you put the link file in, then you can try:

(source from Copying linked content files at each build using MSBuild)

build by adding the following at the end of the .csproj file, just before the final tag:

 <Target Name="CopyLinkedContentFiles" BeforeTargets="Build">
    <Copy SourceFiles="%(Content.Identity)" 
          DestinationFiles="%(Content.Link)" 
          SkipUnchangedFiles='true' 
          OverwriteReadOnlyFiles='true' 
          Condition="'%(Content.Link)' != ''" />
 </Target>
Alan Tsai
  • 2,465
  • 1
  • 13
  • 16
  • i added this, but its didn't take any effect (i didn't found files anywhere). Also i want to copy those files to **specific location**, in my case i specified it within post-build actions as: "%RELEASEPATH%\Code\" – Ony Aug 02 '15 at 11:49