epitka
epitka

Reputation: 17627

MSBuild: why does it not copy my files

In VS2010 project file I have this, yet it does not copy the files at all. Why?

<Target Name="AfterBuild">
    <Exec Command="xcopy.exe /Y /S $(ProjectDir)Templates\*.tt  $(dev_folder)MyWebsites\DotNetNuke%20Community%20Edition\DesktopModules\SharpMod\Templates\"/>
</Target>

Upvotes: 1

Views: 2775

Answers (3)

Ken White
Ken White

Reputation: 125620

You're missing a backslash after $(dev_folder) in your destination. Looking at your comment response to Eric, it's resulting in c:\softwareMyWebsites\DotNetNuke Community Edition\DesktopModules\SharpMod\Templates\ - notice the missing path delimiter between software and MyWebsites.

Upvotes: 0

Eric Eijkelenboom
Eric Eijkelenboom

Reputation: 7021

It might be because you've got spaces in your paths. Try to use double quotes:

<Target Name="AfterBuild">
    <Exec Command="xcopy.exe /Y /S &quot;$(ProjectDir)Templates\*.tt&quot;  &quot;$(dev_folder)MyWebsites\DotNetNuke%20Community%20Edition\DesktopModules\SharpMod\Templates\&quot;"/>
</Target>

Upvotes: 3

Rich
Rich

Reputation: 3720

XCopy code 4 is a permissions or file space issue

Upvotes: 0

Related Questions