8000 dotnet restore fails with 'error getting pack version: ...' when directory name contains @-sign and target is net8.0 · Issue #48981 · dotnet/sdk · GitHub
[go: up one dir, main page]

Skip to content

dotnet restore fails with 'error getting pack version: ...' when directory name contains @-sign and target is net8.0 #48981

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

Open
mycroes opened this issue May 7, 2025 · 5 comments
Labels
Area-Workloads untriaged Request triage from a team member

Comments

@mycroes
Copy link
mycroes commented May 7, 2025

Description

When directory name contains @ and target is net8.0 dotnet restore fails with errors regarding pack versions. Jenkins CI uses @ in workspace name for concurrent jobs by default, which exposed this issue on one of my build agents. This works fine if directory name doesn't contain @ sign. It also works without issues when the project targets net9.0.

Steps to Reproduce

mkdir maui-issue@2
cd maui-issue@2
dotnet new maui -f net8.0
dotnet restore

This works fine in directory without @ in it's name.

Link to public reproduction project repository

No response

Version with bug

8.0.100 SR10

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows 11 24H2, dotnet 9.0.203

Did you find any workaround?

No

Relevant log output

C:\jenkins\gerrit\redacted@2>dotnet restore
C:\Program Files\dotnet\sdk\9.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(107,5): error NETSDK1181: Error getting pack version: Pack 'Microsoft.Android.Ref.34' was not present in workload manifests.
C:\Program Files\dotnet\sdk\9.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(107,5): error NETSDK1181: Error getting pack version: Pack 'Microsoft.Android.Runtime.34.android-arm' was not present in workload manifests.
C:\Program Files\dotnet\sdk\9.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(107,5): error NETSDK1181: Error getting pack version: Pack 'Microsoft.Android.Runtime.34.android-arm64' was not present in workload manifests.
C:\Program Files\dotnet\sdk\9.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(107,5): error NETSDK1181: Error getting pack version: Pack 'Microsoft.Android.Runtime.34.android-x86' was not present in workload manifests.
C:\Program Files\dotnet\sdk\9.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(107,5): error NETSDK1181: Error getting pack version: Pack 'Microsoft.Android.Runtime.34.android-x64' was not present in workload manifests.

Restore failed with 5 error(s) in 1,4s
@anandhan-rajagopal
Copy link

This issue has been verified in Windows 11 with dotnet versions (8.0, 9.0 and 10.0) and MAUI versions (9.0.0, 9.0.60 & 8.0.100). It can be reproduced on net8.0 and does not reproduced on net9.0 and net10.0.

@mycroes
Copy link
Author
mycroes commented May 8, 2025

@sheiksyedm This is indeed fixed on dotnet 9.0.300-preview.0.25177.5 with current preview MAUI. Switched back to 9.0.200, but with preview MAUI and that's still broken. Does this imply it's a dotnet SDK issue only?

@StephaneDelcroix
Copy link

does this happens only with maui projects ? if not it probably should be reported to dotnet directly

@mycroes
Copy link
Author
mycroes commented May 9, 2025

@StephaneDelcroix It doesn't happen with the wpf template, it does happen with the android template. From that I assume it only happens if a workload is required, maybe even only when android is targetted? Please let me know how to move forward.

By the way, testing is as easy as:

mkdir bla@2
cd bla@2
dotnet new globaljson --sdk-version 9.0.200
dotnet new maui -f net8.0
dotnet restore

This still reproduces regardless of now having dotnet 9.0.300-preview installed. I did have to change the framework for android manually, it didn't allow me to pass net8.0-android as -f argument.

@PureWeen PureWeen transferred this issue from dotnet/maui May 15, 2025
@dotnet-policy-service dotnet-policy-service bot added the untriaged Request triage from a team member label May 15, 2025
@github-actions github-actions < 51C2 span class="Label Label--secondary">bot added the Area-Workloads label May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Workloads untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants
0