MSBuild on Jenkins WIN node fails "randomly" with MSB3021 error. #10058
Unanswered
gowindu123
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Did you check during the build, or after the build? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Team,
We are facing the issue of build failure due to MSB3021
We have checked for file locks (like Anti Virus and others) but could notice no process is blocking the files.
After referring the discussions: we have tried setting
set MSBUILDALWAYSRETRY=1
The command that we are invoking for the build is:
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\msbuild" ***********.sln /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU" /nodeReuse:false /verbosity:minimal /p:PrecompileBeforePublish=false /p:OutDir=build /p:DeployTarget=Package /p:DebugType=None /p:DeployOnBuild=true /p:SkipInvalidConfigurations=true /p:PackageAsSingleFile=false /p:AspNetCompileMerge=true /p:RunCodeAnalysis=false /p:WarnAsError=false /nowarn:MSB3247,MSB3277,MSB3021
MSBuild version 17.7.2+d6990bcfa for .NET Framework
The error we get is :
error MSB3021: Unable to copy file *********.dll" to .dll". Access to the path '.dll' is denied.
[ and this is happening randomly for different dlls in different runs .
We are using VS2022 build toolkit for the solution build and the application is framework application v4.8
Please help on this as it is heavily affecting out CI builds
Beta Was this translation helpful? Give feedback.
All reactions