PowerShell / PSResourceGet

PSResourceGet is the package manager for PowerShell
https://www.powershellgallery.com/packages/Microsoft.PowerShell.PSResourceGet
MIT License
475 stars 90 forks source link

Installing a resource from ACR fails #1623

Open diecknet opened 3 months ago

diecknet commented 3 months ago

Prerequisites

Steps to reproduce

I created an ACR like this:

#region config
$AzResourceGroupName = 'RG-PS-ACR'
$AzSubscriptionId    = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
$AzACRName           = 'diecknetgallery'
$AzACRSku            = 'Premium'
$AzRegion            = 'GermanyWestCentral'
#endregion config

# Sign into your Azure account (if necessary)
Connect-AzAccount
# Set context/subscription
Set-AzContext -Subscription $AzSubscriptionId
# Optional: Create a resource group
New-AzResourceGroup -Name $AzResourceGroupName -Location GermanyWestCentral
# Optional: Register subscription to use namespace
Register-AzResourceProvider -ProviderNamespace Microsoft.ContainerRegistry
# Create a container registry
$newAzContainerRegistrySplat = @{
    ResourceGroupName = $AzResourceGroupName
    Name = $AzACRName
    EnableAdminUser = $true
    Sku = $AzACRSku
    Location = $AzRegion
}
$registry = New-AzContainerRegistry @newAzContainerRegistrySplat

Then registered the registry on my local system (PowerShell 7.4.1, PSResourceGet 1.1.0-preview1) like this:

$myAcr = Get-AzContainerRegistry -Name diecknetgallery -ResourceGroupName RG-PS-ACR
$acrUrl = "https://$($myAcr.LoginServer)"
Register-PSResourceRepository -Name diecknetgallery -Uri $acrUrl -Trusted

Then published a small script to ACR like this:

$publishPSResourceSplat = @{
    Path = 'C:\diecknet\BeispielSkript\Beispiel-Skript.ps1'
    Repository = 'diecknetgallery'
}
Publish-PSResource @publishPSResourceSplat

So far so good. I can see that something got created in the ACR via the Azure portal: grafik

I can also find the resource via Find-PSResource:

PS> Find-PSResource -Name beispiel-skript -Repository diecknetgallery

Name            Version Prerelease Repository      Description
----            ------- ---------- ----------      -----------
Beispiel-Skript 1.0                diecknetgallery  Ein einfaches Beispiel für ein Skript …

But I cannot actually install the resource via Install-PSResource

grafik

Expected behavior

PS> Install-PSResource -Name beispiel-skript -Repository diecknetgallery

*Resource installs successfully*

Actual behavior

PS> Install-PSResource -Name beispiel-skript -Repository diecknetgallery

Install-PSResource: Response returned status code package: Not Found.
Install-PSResource: Package(s) 'beispiel-skript' could not be installed from repository 'diecknetgallery'.

Error details

PS> Get-Error

Exception             :
    Type    : Microsoft.PowerShell.PSResourceGet.UtilClasses.ResourceNotFoundException
    Message : Package(s) 'beispiel-skript' could not be installed from repository
'diecknetgallery'.
    HResult : -2146233088
TargetObject          : Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource
CategoryInfo          : InvalidData:
(Microsoft.PowerShel…s.InstallPSResource:InstallPSResource) [Install-PSResource],
ResourceNotFoundException
FullyQualifiedErrorId :
InstallPackageFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource
InvocationInfo        :
    MyCommand        : Install-PSResource
    ScriptLineNumber : 1
    OffsetInLine     : 1
    HistoryId        : 29
    Line             : Install-PSResource -Name beispiel-skript -Repository diecknetgallery
    Statement        : Install-PSResource -Name beispiel-skript -Repository diecknetgallery
    PositionMessage  : At line:1 char:1
                       + Install-PSResource -Name beispiel-skript -Repository
diecknetgallery
                       +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    InvocationName   : Install-PSResource
    CommandOrigin    : Internal
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo :

Environment data

PS> Get-Module Microsoft.PowerShell.PSResourceGet; $PSVersionTable

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     1.1.0      preview1   Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get…

Key   : PSVersion
Value : 7.4.1
Name  : PSVersion

Key   : PSEdition
Value : Core
Name  : PSEdition

Key   : GitCommitId
Value : 7.4.1
Name  : GitCommitId

Key   : OS
Value : Microsoft Windows 10.0.22631
Name  : OS

Key   : Platform
Value : Win32NT
Name  : Platform

Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0…}
Name  : PSCompatibleVersions

Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion

Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion

Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion

Visuals

No response

alerickson commented 3 months ago

@diecknet can you run Install-PSResource -Name beispiel-skript -Repository diecknetgallery -Verbose -Debug?

diecknet commented 3 months ago

@alerickson Sure! Interestingly if using -Verbose and -Debug it asks me if I really want to install the package. It doesn't ask for confirmation if I run without these parameters. Anyway the installation still fails:

PS> Install-PSResource -Name beispiel-skript -Repository diecknetgallery -Debug -Verbose
VERBOSE: All paths to search: 'C:\Users\diecknet\Documents\PowerShell\Modules'
VERBOSE: All paths to search: 'C:\Users\diecknet\Documents\PowerShell\Scripts'
VERBOSE: Retrieving directories in the path 'C:\Users\diecknet\Documents\PowerShell\Modules'
VERBOSE: Retrieving directories in the path 'C:\Users\diecknet\Documents\PowerShell\Scripts'
VERBOSE: All paths to search: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet'
DEBUG: In GetHelper::GetPackagesFromPath()
DEBUG: In GetHelper::FilterPkgPathsByName()
DEBUG: In GetHelper::FilterPkgPathsByVersion()
DEBUG: Searching through package path: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet'
DEBUG: Searching through package path: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet'
DEBUG: Searching through package version path: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet\1.1.0'
DEBUG: Package version parsed as NuGet version: '1.1.0-preview1'
DEBUG: Reading package metadata from: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet\1.1.0\PSGetModuleInfo.xml'
DEBUG: In InstallPSResource::ProcessInstallHelper()
DEBUG: In InstallHelper::BeginInstallPackages()
DEBUG: Parameters passed in >>> Name: 'beispiel-skript'; VersionRange: ''; NuGetVersion: ''; VersionType: 'NoVersion'; Version: ''; Prerelease: 'False'; Repository: 'diecknetgallery'; AcceptLicense: 'False'; Quiet: 'False'; Reinstall: 'False'; TrustRepository: 'False'; NoClobber: 'False'; AsNupkg: 'False'; IncludeXml 'True'; SavePackage 'False'; TemporaryPath ''; SkipDependencyCheck: 'False'; AuthenticodeCheck: 'False'; PathsToInstallPkg: 'C:\Users\diecknet\Documents\PowerShell\Modules,C:\Users\diecknet\Documents\PowerShell\Scripts'; Scope 'CurrentUser'
DEBUG: In InstallHelper::ProcessRepositories()
VERBOSE: Attempting to search for packages in 'diecknetgallery'
DEBUG: In InstallHelper::InstallPackages()
DEBUG: In InstallHelper::InstallPackage()
DEBUG: In ContainerRegistryServerAPICalls::FindName()
DEBUG: In ContainerRegistryServerAPICalls::FindPackagesWithVersionHelper()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryAccessToken()
DEBUG: In ContainerRegistryServerAPICalls::IsContainerRegistryUnauthenticated()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryRefreshToken()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingContentHeaders()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryAccessTokenByRefreshToken()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingContentHeaders()
DEBUG: In ContainerRegistryServerAPICalls::FindContainerRegistryImageTags()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingDefaultHeaders()
DEBUG: In ContainerRegistryServerAPICalls::GetPackagesWithRequiredVersion()
DEBUG: 'beispiel-skript' version parsed as '1.0'
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryMetadata()
DEBUG: In ContainerRegistryServerAPICalls::FindContainerRegistryManifest()
DEBUG: GET manifest url:  https://diecknetgallery.azurecr.io/v2/beispiel-skript/manifests/1.0
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingDefaultHeaders()
DEBUG: In ContainerRegistryServerAPICalls::GetMetadataProperty()
DEBUG: 'beispiel-skript' version parsed as '1.0'

Confirm
Are you sure you want to perform this action?
Performing the operation "Install-PSResource" on target "Package to install:
'Beispiel-Skript', version: '1.0.0'".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y
DEBUG: In ContainerRegistryServerAPICalls::InstallPackage()
DEBUG: In ContainerRegistryServerAPICalls::InstallVersion()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryAccessToken()
DEBUG: In ContainerRegistryServerAPICalls::IsContainerRegistryUnauthenticated()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryRefreshToken()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingContentHeaders()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryAccessTokenByRefreshToken()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingContentHeaders()
VERBOSE: Getting manifest for beispiel-skript - 1.0.0
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryRepositoryManifest()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingDefaultHeaders()
Install-PSResource: Response returned status code package: Not Found.
VERBOSE: Attempting to delete 'C:\Users\diecknet\AppData\Local\Temp\31ff754e-62c5-4268-820c-38a5949e9313'
VERBOSE: Successfully deleted 'C:\Users\diecknet\AppData\Local\Temp\31ff754e-62c5-4268-820c-38a5949e9313'
Install-PSResource: Package(s) 'beispiel-skript' could not be installed from repository 'diecknetgallery'.

I'm trying to install a quickly created test script here using Install-PSResource, but maybe something is wrong with the script or the script metadata. I'll try later with a module and a script which work in the PowerShell Gallery.

I tried now with a module that works in the PowerShell Gallery (which I created). It still doesn't install.

PS> Find-PSResource -Name Exchange -Repository diecknetgallery

Name     Version Prerelease Repository      Description
----     ------- ---------- ----------      -----------
Exchange 0.3                diecknetgallery This is a placeholder module to prevent typo-s…

PS> Install-PSResource -Name Exchange -Repository diecknetgallery
Install-PSResource: Response returned status code package: Not Found.
Install-PSResource: Package(s) 'Exchange' could not be installed from repository 'diecknetgallery'.
PS> Install-PSResource -Name Exchange -Repository diecknetgallery -Debug -Verbose
VERBOSE: All paths to search: 'C:\Users\diecknet\Documents\PowerShell\Modules'
VERBOSE: All paths to search: 'C:\Users\diecknet\Documents\PowerShell\Scripts'
VERBOSE: Retrieving directories in the path 'C:\Users\diecknet\Documents\PowerShell\Modules'
VERBOSE: Retrieving directories in the path 'C:\Users\diecknet\Documents\PowerShell\Scripts'
VERBOSE: All paths to search: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet'
DEBUG: In GetHelper::GetPackagesFromPath()
DEBUG: In GetHelper::FilterPkgPathsByName()
DEBUG: In GetHelper::FilterPkgPathsByVersion()
DEBUG: Searching through package path: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet'
DEBUG: Searching through package path: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet'
DEBUG: Searching through package version path: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet\1.1.0'
DEBUG: Package version parsed as NuGet version: '1.1.0-preview1'
DEBUG: Reading package metadata from: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet\1.1.0\PSGetModuleInfo.xml'
DEBUG: In InstallPSResource::ProcessInstallHelper()
DEBUG: In InstallHelper::BeginInstallPackages()
DEBUG: Parameters passed in >>> Name: 'Exchange'; VersionRange: ''; NuGetVersion: ''; VersionType: 'NoVersion'; Version: ''; Prerelease: 'False'; Repository: 'diecknetgallery'; AcceptLicense: 'False'; Quiet: 'False'; Reinstall: 'False'; TrustRepository: 'False'; NoClobber: 'False'; AsNupkg: 'False'; IncludeXml 'True'; SavePackage 'False'; TemporaryPath ''; SkipDependencyCheck: 'False'; AuthenticodeCheck: 'False'; PathsToInstallPkg: 'C:\Users\diecknet\Documents\PowerShell\Modules,C:\Users\diecknet\Documents\PowerShell\Scripts'; Scope 'CurrentUser'
DEBUG: In InstallHelper::ProcessRepositories()
VERBOSE: Attempting to search for packages in 'diecknetgallery'
DEBUG: In InstallHelper::InstallPackages()
DEBUG: In InstallHelper::InstallPackage()
DEBUG: In ContainerRegistryServerAPICalls::FindName()
DEBUG: In ContainerRegistryServerAPICalls::FindPackagesWithVersionHelper()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryAccessToken()
DEBUG: In ContainerRegistryServerAPICalls::IsContainerRegistryUnauthenticated()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryRefreshToken()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingContentHeaders()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryAccessTokenByRefreshToken()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingContentHeaders()
DEBUG: In ContainerRegistryServerAPICalls::FindContainerRegistryImageTags()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingDefaultHeaders()
DEBUG: In ContainerRegistryServerAPICalls::GetPackagesWithRequiredVersion()
DEBUG: 'exchange' version parsed as '0.3'
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryMetadata()
DEBUG: In ContainerRegistryServerAPICalls::FindContainerRegistryManifest()
DEBUG: GET manifest url:  https://diecknetgallery.azurecr.io/v2/exchange/manifests/0.3
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingDefaultHeaders()
DEBUG: In ContainerRegistryServerAPICalls::GetMetadataProperty()
DEBUG: 'exchange' version parsed as '0.3'

Confirm
Are you sure you want to perform this action?
Performing the operation "Install-PSResource" on target "Package to install: 'Exchange',
version: '0.3.0'".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y
DEBUG: In ContainerRegistryServerAPICalls::InstallPackage()
DEBUG: In ContainerRegistryServerAPICalls::InstallVersion()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryAccessToken()
DEBUG: In ContainerRegistryServerAPICalls::IsContainerRegistryUnauthenticated()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryRefreshToken()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingContentHeaders()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryAccessTokenByRefreshToken()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingContentHeaders()
VERBOSE: Getting manifest for exchange - 0.3.0
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryRepositoryManifest()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingDefaultHeaders()
Install-PSResource: Response returned status code package: Not Found.
VERBOSE: Attempting to delete 'C:\Users\diecknet\AppData\Local\Temp\1cc0a167-7ee3-40b0-bd19-dadec51d69c7'
VERBOSE: Successfully deleted 'C:\Users\diecknet\AppData\Local\Temp\1cc0a167-7ee3-40b0-bd19-dadec51d69c7'
Install-PSResource: Package(s) 'Exchange' could not be installed from repository 'diecknetgallery'.

And I tried with the "winfetch" script from the PowerShell Gallery. I'm a bit surprised: That one works. So maybe something is wrong with my scripts/modules...

PS C:\diecknet\PSModule> Install-PSResource winfetch -Repository diecknetgallery -Verbose -Debug
VERBOSE: All paths to search: 'C:\Users\diecknet\Documents\PowerShell\Modules'
VERBOSE: All paths to search: 'C:\Users\diecknet\Documents\PowerShell\Scripts'
VERBOSE: Retrieving directories in the path 'C:\Users\diecknet\Documents\PowerShell\Modules'
VERBOSE: Retrieving directories in the path 'C:\Users\diecknet\Documents\PowerShell\Scripts'
VERBOSE: All paths to search: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet'
DEBUG: In GetHelper::GetPackagesFromPath()
DEBUG: In GetHelper::FilterPkgPathsByName()
DEBUG: In GetHelper::FilterPkgPathsByVersion()
DEBUG: Searching through package path: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet'
DEBUG: Searching through package path: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet'
DEBUG: Searching through package version path: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet\1.1.0'
DEBUG: Package version parsed as NuGet version: '1.1.0-preview1'
DEBUG: Reading package metadata from: 'C:\Users\diecknet\Documents\PowerShell\Modules\Microsoft.PowerShell.PSResourceGet\1.1.0\PSGetModuleInfo.xml'
DEBUG: In InstallPSResource::ProcessInstallHelper()
DEBUG: In InstallHelper::BeginInstallPackages()
DEBUG: Parameters passed in >>> Name: 'winfetch'; VersionRange: ''; NuGetVersion: ''; VersionType: 'NoVersion'; Version: ''; Prerelease: 'False'; Repository: 'diecknetgallery'; AcceptLicense: 'False'; Quiet: 'False'; Reinstall: 'False'; TrustRepository: 'False'; NoClobber: 'False'; AsNupkg: 'False'; IncludeXml 'True'; SavePackage 'False'; TemporaryPath ''; SkipDependencyCheck: 'False'; AuthenticodeCheck: 'False'; PathsToInstallPkg: 'C:\Users\diecknet\Documents\PowerShell\Modules,C:\Users\diecknet\Documents\PowerShell\Scripts'; Scope 'CurrentUser'
DEBUG: In InstallHelper::ProcessRepositories()
VERBOSE: Attempting to search for packages in 'diecknetgallery'
DEBUG: In InstallHelper::InstallPackages()
DEBUG: In InstallHelper::InstallPackage()
DEBUG: In ContainerRegistryServerAPICalls::FindName()
DEBUG: In ContainerRegistryServerAPICalls::FindPackagesWithVersionHelper()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryAccessToken()
DEBUG: In ContainerRegistryServerAPICalls::IsContainerRegistryUnauthenticated()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryRefreshToken()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingContentHeaders()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryAccessTokenByRefreshToken()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingContentHeaders()
DEBUG: In ContainerRegistryServerAPICalls::FindContainerRegistryImageTags()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingDefaultHeaders()
DEBUG: In ContainerRegistryServerAPICalls::GetPackagesWithRequiredVersion()
DEBUG: 'winfetch' version parsed as '2.5.1'
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryMetadata()
DEBUG: In ContainerRegistryServerAPICalls::FindContainerRegistryManifest()
DEBUG: GET manifest url:  https://diecknetgallery.azurecr.io/v2/winfetch/manifests/2.5.1
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingDefaultHeaders()
DEBUG: In ContainerRegistryServerAPICalls::GetMetadataProperty()
DEBUG: 'winfetch' version parsed as '2.5.1'

Confirm
Are you sure you want to perform this action?
Performing the operation "Install-PSResource" on target "Package to install: 'winfetch',
version: '2.5.1'".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y
DEBUG: In ContainerRegistryServerAPICalls::InstallPackage()
DEBUG: In ContainerRegistryServerAPICalls::InstallVersion()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryAccessToken()
DEBUG: In ContainerRegistryServerAPICalls::IsContainerRegistryUnauthenticated()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryRefreshToken()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingContentHeaders()
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryAccessTokenByRefreshToken()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingContentHeaders()
VERBOSE: Getting manifest for winfetch - 2.5.1
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryRepositoryManifest()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpResponseJObjectUsingDefaultHeaders()
DEBUG: In ContainerRegistryServerAPICalls::GetDigestFromManifest()
VERBOSE: Downloading blob for winfetch - 2.5.1
DEBUG: In ContainerRegistryServerAPICalls::GetContainerRegistryBlobAsync()
DEBUG: In ContainerRegistryServerAPICalls::GetHttpContentResponseJObject()
DEBUG: In InstallHelper::TryInstallToTempPath()
DEBUG: In InstallHelper::DeleteExtraneousFiles()
DEBUG: Deleting 'C:\Users\diecknet\AppData\Local\Temp\1650e686-64fa-41a0-b1af-0244bdaccd6f\winfetch\2.5.1\winfetch.nuspec'
DEBUG: Deleting 'C:\Users\diecknet\AppData\Local\Temp\1650e686-64fa-41a0-b1af-0244bdaccd6f\winfetch\2.5.1\[Content_Types].xml'
DEBUG: Deleting 'C:\Users\diecknet\AppData\Local\Temp\1650e686-64fa-41a0-b1af-0244bdaccd6f\winfetch\2.5.1\_rels'
DEBUG: Deleting 'C:\Users\diecknet\AppData\Local\Temp\1650e686-64fa-41a0-b1af-0244bdaccd6f\winfetch\2.5.1\package'
DEBUG: In InstallHelper::CreateMetadataXMLFile()

Confirm
Are you sure you want to perform this action?
Performing the operation "Install-PSResource" on target "Exit ShouldProcess".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y
DEBUG: In InstallHelper::TryMoveInstallContent()
DEBUG: In InstallHelper::MoveFilesIntoInstallPath()
VERBOSE: Installation source path is: 'C:\Users\diecknet\AppData\Local\Temp\1650e686-64fa-41a0-b1af-0244bdaccd6f\winfetch\2.5.1'
VERBOSE: Installation destination path is: 'C:\Users\diecknet\Documents\PowerShell\Scripts'
VERBOSE: Checking if path 'C:\Users\diecknet\Documents\PowerShell\Scripts\InstalledScriptInfos\winfetch_InstalledScriptInfo.xml' exists: 'False'
VERBOSE: Moving 'C:\Users\diecknet\AppData\Local\Temp\1650e686-64fa-41a0-b1af-0244bdaccd6f\winfetch\2.5.1\winfetch_InstalledScriptInfo.xml' to 'C:\Users\diecknet\Documents\PowerShell\Scripts\InstalledScriptInfos\winfetch_InstalledScriptInfo.xml'
VERBOSE: Checking if path 'False' exists:
VERBOSE: Moving 'C:\Users\diecknet\AppData\Local\Temp\1650e686-64fa-41a0-b1af-0244bdaccd6f\winfetch\2.5.1\winfetch.ps1' to 'C:\Users\diecknet\Documents\PowerShell\Scripts\winfetch.ps1'
VERBOSE: Successfully installed package 'winfetch' to location 'C:\Users\diecknet\Documents\PowerShell\Scripts'
WARNING: The installation path for the script does not currently appear in the CurrentUser path environment variable. To make the script discoverable, add the script installation path, C:\Users\diecknet\Documents\PowerShell\Scripts, to the environment PATH variable.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): Y
VERBOSE: Attempting to delete 'C:\Users\diecknet\AppData\Local\Temp\1650e686-64fa-41a0-b1af-0244bdaccd6f'
VERBOSE: Successfully deleted 'C:\Users\diecknet\AppData\Local\Temp\1650e686-64fa-41a0-b1af-0244bdaccd6f'

I also tried now with a quickly created module/module manifest. That one works. I'm confused. Just retried with my basic script, even with a new name, but it still fails.

SydneyhSmith commented 3 months ago

Does Test-PSScriptFileInfo and Test-ModuleManifest work on your resources?

SydneyhSmith commented 3 months ago

Also what is your versions of your resources? I am wondering if there is a bug with two digit versions

SydneyhSmith commented 3 months ago

We were able to repro...looks like a bug with two digit versions

diecknet commented 3 months ago

Okay, then I guess you probably don't need the result of the two Test-cmdlets from my side anymore, right?

Test results `Test-PSScriptFileInfo` just returned `true`. And for the module manifest that already used a 3 digit version number: ```powershell PS C:\diecknet\ACR> Test-ModuleManifest -Path C:\diecknet\ACR\Beispiel-Modul\Beispiel-Modul.psd1 -Debug -Verbose | Select-Object * LogPipelineExecutionDetails : False Name : Beispiel-Modul Path : C:\diecknet\ACR\Beispiel-Modul\Beispiel-Modul.psd1 ImplementingAssembly : Definition : Description : test 12345 Guid : 06c7909c-cb62-4d68-8209-a64236a8ebf8 HelpInfoUri : ModuleBase : C:\diecknet\ACR\Beispiel-Modul PrivateData : {[PSData, System.Collections.Hashtable]} ExperimentalFeatures : {} Tags : {} ProjectUri : IconUri : LicenseUri : ReleaseNotes : RepositorySourceLocation : Version : 0.0.4 ModuleType : Manifest Author : diecknet AccessMode : ReadWrite ClrVersion : CompanyName : Unknown Copyright : (c) diecknet. All rights reserved. DotNetFrameworkVersion : ExportedFunctions : {} Prefix : ExportedCmdlets : {} ExportedCommands : {} FileList : {} CompatiblePSEditions : {} ModuleList : {} NestedModules : {} PowerShellHostName : PowerShellHostVersion : PowerShellVersion : ProcessorArchitecture : None Scripts : {} RequiredAssemblies : {} RequiredModules : {} RootModule : ExportedVariables : {} ExportedAliases : {} ExportedDscResources : {} SessionState : OnRemove : ExportedFormatFiles : {} ExportedTypeFiles : {} ```

I changed the ScriptFileInfo of my example script to use 1.5.0 as the version number and that works fine now. grafik