Closed willibrandon closed 1 year ago
Nice catch. I'll fix it with a fresh merge from the Library.Template on which it's based.
On second thought, that's going to be a lot of trouble, so we'll take a PR to fix just this problem if you'd like to submit it.
I can do that. After reading dotnet-install scripts reference, Options -Architecture:
Architecture of the .NET binaries to install. Possible values are
, amd64, x64, x86, arm64, arm, and s390x.
Do you think its safe for me to assume that the architecture elements of the file name will always be lowercase? That seems to be the case after downloading and inspecting all of the files from the Downlaod .NET page.
Yes, I think that's a reasonable assumption. I may still merge Library.Template ... I'm not sure. So whatever you come up with just needs to fix the immediate problem -- it doesn't have to be sure to work for years to come. :)
I need to build a library so I can use your library template.
When I run the init script
init -installlocality machine
from an elevated command prompt.The exception occurs in Install-DotNetSdk.ps1. If I output the
Uri
inGet-InstallerExe
:https://dotnetcli.blob.core.windows.net/dotnet/Sdk/6.0.402/dotnet-sdk-6.0.402-win-X64.exe
Note the capital X in X64
https://dotnetcli.blob.core.windows.net/dotnet/Sdk/6.0.402/dotnet-sdk-6.0.402-win-X64.exe
Changing the uppercase X64 to a lowercase x64 alleviates the issue.
https://dotnetcli.blob.core.windows.net/dotnet/Sdk/6.0.402/dotnet-sdk-6.0.402-win-x64.exe
I suspect the capital X comes from here.
https://github.com/dotnet/pinvoke/blob/46248960498eba12f2f4a881504cc2d4f98d4dca/tools/Install-DotNetSdk.ps1#L32
Which returns an Architecture Enum value containing a capital X.