Navcontainerhelper: Install-BcContainerHelper Version 1.0.7 shows error about unknown parameter "AllowPrerelease"

Created on 2 Oct 2020  路  8Comments  路  Source: microsoft/navcontainerhelper

Version: latest
BcContainerHelper 1.0.6 is installed
Determine latest BcContainerHelper version
BcContainerHelper 1.0.7 is the latest version
Updating BcContainerHelper to 1.0.7
Update-Module : Es wurde kein Parameter gefunden, der dem Parameternamen "AllowPrerelease" entspricht.
In C:\BE-terna\Powershell\Scripts\Docker\Install-BcContainerHelper.ps1:59 Zeichen:101
+ ... er -Force -RequiredVersion $bcContainerHelperVersion -AllowPrerelease
+                                                          ~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Update-Module], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Update-Module

Remark: this routine is used by
https://dev.azure.com/businesscentralapps/HelloWorld/_git/HelloWorld?path=%2Fscripts%2FInstall-BcContainerHelper.ps1

All 8 comments

@freddydk
where can I put comments or errors about your HelloWorld example?

Here is fine.
on this one - in settings.json is uses preview - change that to latest (then it uses latest non-prerelease)
Look: https://freddysblog.com/2020/08/11/bccontainerhelper/ - search for allowprerelease

Hello @freddydk,
thanks for the fast reply.
Updating PowerShellGet did help,
_However we define no version for bccontainerhelper in our settings, therefore it took "latest" (see in the first posting)._

[off-topic]
@freddydk
where can I put comments or errors about your HelloWorld example?
https://dev.azure.com/businesscentralapps/HelloWorld/

We are using those scripts for our pipelines and now we are trying to use the new "Run-AlPipeline" script.
We had to add the "NewBcContainer" parameter to adjust our container build.

I think the setting in settings.json was "preview" and not "latest"
"latest" should grab latest released version
"preview" should grab latest preview version

What did you have to do in NewBcContainer?
(Maybe I can advice other ways - or implement other ways)
Overriding the functions should be last resort and not something all need to do.

Thanks for trying out Run-AlPipeline.

I am right now updating it to include most (if not all) the automated validation tests done when submitting for validation.

We need to install Barcode into the container (1D barcode fonts and an OnPrem barcode .NET) to get our apps compiling.

This code does work: we had to fill and to add the NewBcContainer parameter for that.

$NewBcContainer = { Param([Hashtable]$parameters) 
        New-BcContainer @parameters; 
        .\scripts\Install-Fonts.ps1 -containerName $parameters.ContainerName ; 
        .\scripts\Install-ThirdParty.ps1 -containerName $parameters.ContainerName; 
        Invoke-ScriptInBcContainer $parameters.ContainerName 
        -scriptblock { $progressPreference = 'SilentlyContinue' } }

Run-AlPipeline @params 
    -pipelinename $pipelineName 
    -containerName $containerName 
    -imageName $imageName 
    -NewBcContainer $NewBcContainer 

For the moment I am getting an error about compiling the code (some packages seem to be missing).
Therefore I am wondering if there is some kind of platform to report problems or questions.

Additionally I am wondering how to skip the "Run-Test" functionality.
Remark: we can't get your "Run-Test" scripts running (including the old existing scripts) since we are getting Client-Context errors if we try to post inventory within our integrations tests (I did report that several times).
For the moment we are running our tests directly via the codeunits itself (in that case we have no isolation which makes things quite difficult for testing).

The Run-AlPipeline is part of containerhelper - so this is the right place.
Run-AlPipeline is very much optimized for appsource apps or per tenant extensions for BC Saas.

There is a parameter called -doNotRunTests which bypasses the test runner.

Was this page helpful?
0 / 5 - 0 ratings