Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8816971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:44:26+00:00 2026-06-14T04:44:26+00:00

I have an msbuild proj file as follows. <Project xmlns=http://schemas.microsoft.com/developer/msbuild/2003 DefaultTargets=Demo> <ItemGroup> <AllFiles Include=src\**\*

  • 0

I have an msbuild proj file as follows.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"   DefaultTargets="Demo">

 <ItemGroup>
   <AllFiles Include="src\**\*" ></SrcFiles>
 </ItemGroup>

 <PropertyGroup>
  <DestFolder>copy\</DestFolder>
 </PropertyGroup>

 <ItemGroup>
  <Transform01
   Include="@(AllFiles >'$(DestFolder)%(RecursiveDir)%(Filename)%(Extension)')" />
  </ItemGroup>

 <Target Name="Demo">
  <Message Text="%40(Transform01):" Importance="high" />
   <Message Text="@(Transform01)" />
   <Message Text="===== Copying files =====" Importance="high" />
   <Copy SourceFiles="@(AllFiles)" DestinationFiles="@(Transform01)" />
   <Copy SourceFiles="@(AllFiles)" DestinationFiles="@(AllFiles >'$(DestFolder)%(RecursiveDir)%(Filename)%(Extension)')" />
 </Target>

 </Project>

The two copy process specified in the above target is throwing errors as follows
First copy is throwing error as follows

 (error MSB3094: "DestinationFiles" refers to 1 item(s), and "SourceFiles" refers to 14   item(s). They must have the same number of items.)

The second copy is throwing error as below

error MSB3021: Unable to copy file "..\Data\Files\dll\1.dll" to "@(AllFiles >'copy\dll\1.dll')".Illegal characters in path.

But if i write the copy process as shown below copy will take place with no error

<Copy SourceFiles="@(AllFiles)" DestinationFiles="$(DestFolder)%(RecursiveDir)%(Filename)%(Extension)" />

Why this is happening?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:44:27+00:00Added an answer on June 14, 2026 at 4:44 am

    You may be missing a – character in your transforms.

     <Copy SourceFiles="@(AllFiles)" DestinationFiles="@(AllFiles ->'$(DestFolder)%(RecursiveDir)%(Filename)%(Extension)')" />
    

    The following should also work.

    <Copy SourceFiles="@(AllFiles)" DestinationFolder="$(DestFolder)\%(AllFiles.RecursiveDir)" />
    

    Source: http://msdn.microsoft.com/en-us/library/3e54c37h.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a shared properties file shared.properties.proj <Project xmlns=http://schemas.microsoft.com/developer/msbuild/2003> <PropertyGroup> <SharedAssemblySearch>$(MSBuildProjectDirectory)\..\Shared Assemblies</SharedAssemblySearch> <ParentDir>..</ParentDir> <SharedAssemblySearch
I have the following MSBuild project file: <?xml version=1.0 encoding=utf-8?> <Project xmlns=http://schemas.microsoft.com/developer/msbuild/2003 DefaultTargets=Deploy ToolsVersion=4.0>
I have the following proj file: <?xml version=1.0 encoding=utf-8?> <Project ToolsVersion=4.0 DefaultTargets=Build xmlns=http://schemas.microsoft.com/developer/msbuild/2003> <PropertyGroup>
I use the TFS 2008 build facilities. I have a large MSBuild project (TFSBuild.proj)
We have a standard MSBuild project file that is used for our different deployment
MSBuild 3.5 I have the following project structure: trunk/MainSolution.sln trunk/Build/MyBuild.Proj trunk/Library/... trunk/etc... So far,
I have a MSBuild *.proj file that builds my solution and sets build's version
I have this msbuild target in my csproj file: <Target Name=AfterBuild Condition= '$(Configuration)' ==
Currently, I've got he following code in an MSBuild proj file. It's really simple.
In MsBuild it is possible to create a build.proj.user file which is parsed by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.