Error MSB3073: copy / d "C: \ LOANAPP \ UX \ UserControls \ *. Css" "C: \ LOANAPP \ UX \ GetQuotations \ ThirdPartyOperator \ CSS" "exited with code 1

We get this error in a project in a web application solution that has VSS as a control source. The project has a script in the command line of the assembly event on the properties page of the VS 2005 project - the assembly event is as follows:

copy /d "$(SolutionDir)UX\UserControls\*.ascx" "$(SolutionDir)UX\GetQuotations\ThirdPartyOperator\UserControls" copy /d "$(SolutionDir)UX\UserControls\*.master" "$(SolutionDir)UX\GetQuotations\ThirdPartyOperator\UserControls" copy /d "$(SolutionDir)UX\UserControls\*.js" "$(SolutionDir)UX\GetQuotations\ThirdPartyOperator\Javascript" copy /d "$(SolutionDir)UX\UserControls\*.css" "$(SolutionDir)UX\GetQuotations\ThirdPartyOperator\CSS" 

gives the following error:

==================================================== ============

 C:\LOANAPP\UX\UserControls\dhtmlwindow.css C:\LOANAPP\UX\UserControls\modal.css 2 file(s) copied. C:\LOANAPP\UX\UserControls\dhtmlwindow.css **Access is denied.** C:\LOANAPP\UX\UserControls\modal.css **Access is denied.** 0 file(s) copied. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(823,9): error MSB3073: copy /d "C:\LOANAPP\UX\UserControls\*.ascx" "C:\LOANAPP\UX\GetQuotations\ThirdPartyOperator\UserControls" C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(823,9): error MSB3073: copy /d "C:\LOANAPP\UX\UserControls\*.ascx" "C:\LOANAPP\UX\GetQuotations\ThirdPartyOperator\UserControls" C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(823,9): error MSB3073: copy /d "C:\LOANAPP\UX\UserControls\*.master" "C:\LOANAPP\UX\GetQuotations\ThirdPartyOperator\UserControls" C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(823,9): error MSB3073: copy /d "C:\LOANAPP\UX\UserControls\*.js" "C:\LOANAPP\UX\GetQuotations\ThirdPartyOperator\Javascript" **C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(823,9): error MSB3073: copy /d "C:\LOANAPP\UX\UserControls\*.css" "C:\LOANAPP\UX\GetQuotations\ThirdPartyOperator\CSS" exited with code 1.** 

Due to this error, we are not able to complete the assembly of solutions.

Can someone help us so we can continue ...

+6
source share
4 answers

I am currently facing the same problem.

Removing the release / debug directory before creating the solution will solve the problem for one assembly. When recovering from this, you need to do this again, but ...

I will publish the real solution when I find it ...

Edit: After examining the problem, I found out that the problem in my solution was due to the fact that the copy command at my stage after the assembly led to the question of whether to overwrite existing files. This is somehow causing this problem.

The solution for me was to add the '/ y'option command to the copy / xcopy command that you are running so that these rewritable questions are not asked.

+5
source

If you rename the project name or change the name of the output file, change it in the events after the build, and this can be solved.

+4
source

error MSB3073: copy / d "C: \ LOANAPP \ UX \ UserControls * .css" "C: \ LOANAPP \ UX \ GetQuotations \ ThirdPartyOperator \ CSS" exits with code 1.

When the pre / post build command "exits with code 1", it means that it failed. Just as if you said, "Copy *. * F: \ lolusux" and you did not have a recordable disc f :.

The solution is to fix the error.

What is the mistake you say? I dont know. But I know how I would understand it.

  • Run assembly. At the build output, copy the pre / post build commands as you did to paste them into your question. They will have all macros filled with actual values, which may be part of the problem.
  • Paste it into Notepad. Clear the entire gap (i.e., delete text without commands, for example, "error MSB3073:", and save the text of the command, for example, "copy / d": C: \ LOANAPP \ UX \ UserControls * .css "C: \ LOANAPP \ UX \ GetQuotations \ ThirdPartyOperator \ CSS ")
  • Open a command window. Browse to the output directory of the project that you cannot create. This is the root directory in which these commands are executed.
  • (optional for post-build) disable post build commands and build a solution; this may be required to ensure that the files are in the expected state when the post build commands are executed.
  • Copy each line of pre / post build commands from notepad, paste them into the command window and execute them. From the first to the last, one by one. You will see that the command does not work (if you did everything correctly, if not, go back) and you will receive the exact error message / reason for the failure.
  • Fix the real problem.
+1
source

Just in case, if anyone finds that their problem is not resolved by any of the above, I found that the error was caused by folders in the path with spaces in their names. For instance:

 MyFolder\ThirdParty Test\Blah\MoreFolders\BuildDirectory 

... will fail, but

 MyFolder\ThirdPartyTest\Blah... 

Will work without problems. If you need to have a space in the path, surround the entire directory call in double quotes, for example:

 "MyFolder\ThirdParty Test\Blah\MoreFolders\BuildDirectory" 

Or just a corrupt folder:

 MyFolder\"ThirdParty Test"\Blah\MoreFolders\BuildDirectory 
+1
source

Source: https://habr.com/ru/post/890842/


All Articles