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

Install-Package failed because a temp file already exists #544

Open
anonhostpi opened this issue Jan 18, 2024 · 1 comment
Open

Install-Package failed because a temp file already exists #544

anonhostpi opened this issue Jan 18, 2024 · 1 comment

Comments

@anonhostpi
Copy link

anonhostpi commented Jan 18, 2024

Installing Microsoft.Extensions.DependencyInjection.Abstractions from NuGet seems to self-extract the same file twice, causing errors

Environments:

  • PowerShell 7.4.0 on .NET 8 on Win 11
  • Windows PowerShell on Win 11

To reproduce:

Install-Package `
  -Name "Microsoft.Extensions.DependencyInjection.Abstractions" `
  -RequiredVersion 3.1.0 `
  -Scope CurrentUser

Result:

Install-Package : Package 'Microsoft.Extensions.DependencyInjection.Abstractions' failed to be installed
because: The file 'C:\Users<username>\AppData\Local\Temp\4114qgpj\packageIcon.png' already exists.

@anonhostpi anonhostpi changed the title Package failed to be installed because a file already exists Install-Package failed because a temp file already exists Jan 18, 2024
@anonhostpi
Copy link
Author

anonhostpi commented Jan 18, 2024

Looks like the issue is caused when 2 entries in the source .nupkg file share the same path:

image

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