Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deep dive on why copy action fails initially during build process #766

Open
schlaman-ms opened this issue Jun 8, 2023 · 0 comments
Open

Comments

@schlaman-ms
Copy link
Contributor

Find root cause of why two different sets of file assets generate a warning of a copy failure even though the destination will always end up with those files being copied.

  • In AzureDevOpsConfiguration.csproj, SalModernization.csproj in <Target Name="CopyingSpam ...> there is a Copy SourceFiles= command

In Security.csproj in <Target Name="CopyingSecurityToSpam" ...> there is a Copy SourceFiles= command.

  • In each of these, there is a <Copy SourceFiles=.... that requires a ContinueOnEror="true" flag because during each build there will be an instance where the file does not copy but ultimately it always successfully copies.

  • The files are being copied do end up copied to the right location, but during the build there is a warning that is generated because of the copy that earlier on in the build doesn't copy (but ultimately does).

For now to eliminate the warning from the build, the following has been added to the build.common.props file.
The ultimate fix would be to determine why the 'SecurityFile' and 'SdkFile' items do not copy at first and generate a warning.

All appearances are that this is not causing a problem but just generating a warning and that warning is being suppressed now.

      // MSB3030 - This error occurs when a file that was supposed to be
  //  copied isn't found at the expected location.
  //  There are copy commands that have a continueOnError=true because
  //  there is a time in the copy process where a copy fails before it
  //  succeeds for those commands with the continueOnError. Those copy
  //  commands have been set to continueOnError for almost two years.
  $(MSBuildWarningsAsMessages);MSB3277;MSB3030
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant