dotnet / msbuild

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
https://docs.microsoft.com/visualstudio/msbuild/msbuild
MIT License
5.23k stars 1.35k forks source link

[UnzipTask] - Access to the path is denied #3919

Open deinok opened 6 years ago

deinok commented 6 years ago
<Unzip SourceFiles="$(MSBuildProjectDirectory)/bin/zipFile.zip"
            DestinationFolder="$(MSBuildProjectDirectory)/bin/" />

throw the following error Access to the path is denied. Permisions are okey

livarcocc commented 6 years ago

Are you sure that $(MSBuildProjectDirectory)/bin/zipFile.zip points to the right file?

Also, what OS is this at?

deinok commented 6 years ago

Yes, completely sure. Tested on win-x64 and linux-x64. v2.1.403 This is the zip -> https://nodejs.org/dist/v10.13.0/node-v10.13.0-win-x64.zip

deinok commented 5 years ago

Any update on this?

gaviriar commented 5 years ago

I am facing this problem as well, any updates here?

dellis1972 commented 5 years ago

can someone post some diagnostic output of the build which has an error, that might help people investigate.

I have seen this kind of thing before where the property is empty (in this case $(MSBuildProjectDirectory)). The result will be the Unzip task trying to extract too /bin/ which will definitely not work.

jonathanpeppers commented 1 year ago

I was seeing this problem here (note I'll make this public end of week): https://github.com/jonathanpeppers/dotnes/pull/16

I changed the pool ubuntu-latest -> macOS-latest and the problem went away.

Here is a .binlog: ubuntu-example.zip

jonathanpeppers commented 1 year ago

Ok, the failure here is very random. It failed for me once on macOS, and retry works occasionally.