dotnet restore fails with 'error getting pack version: ...' when directory name contains @-sign and target is net8.0 · Issue #48981 · dotnet/sdk · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
@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 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.
Uh oh!
There was an error while loading. Please reload this page.
Description
When directory name contains
@
and target is net8.0dotnet 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
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
The text was updated successfully, but these errors were encountered: