Skip to content

property 'PACKAGE_NAME' missing in build for cloudPackages #166

@manuelcastronuovo

Description

@manuelcastronuovo

Hi,
I’m trying to use your GitHub Actions workflows to build and deploy a cloud deployable package for a Unified Development Environment in Dynamics 365 Finance & Operations.
In my build job, I configured the workflow using your actions (see placeholder below):
jobs:
build:
name: Build Solution
runs-on: windows-latest

steps:
  - name: Checkout repository
    uses: actions/checkout@v4.1.1
    with:
      fetch-depth: 0

  - name: Read settings.json
    uses: fscpscollaborative/fscps.gh/ReadSettings@v2.1

  - name: Setup MSBuild
    uses: microsoft/setup-msbuild@v2

  - name: Setup NuGet
    uses: nuget/setup-nuget@v2.0.0
    with:
      nuget-version: 5.10.x   
  
  - name: Build FSC Solution
    uses: fscpscollaborative/fscps.gh/RunPipeline@v2.1
    id: runpipeline
    with:
      version: latest
      settingsJson: ${{ env.Settings }}

  - name: Add logs to job summary
    if: ${{ !cancelled() }}
    run: |
      if (![string]::IsNullOrEmpty("${{ env.ARTIFACTS_PATH }}")) {
        $logFiles = Get-ChildItem -Path "${{ env.ARTIFACTS_PATH }}\Logs" -Recurse -Filter *.log
        $summary = "# Logs `n`n"
        if ($logFiles) {
            foreach ($logFile in $logFiles) {
                $content = Get-Content -Path $logFile.FullName
                $summary += "## $($logFile.Name) `n"
                foreach ($line in $content) {
                    # if the line consists only of = or - characters 
                    # (which would be interpreted as a setext heading 
                    # (https://github.github.com/gfm/#setext-headings)), 
                    # add a new line before it
                    if ($line -match "^[=-]+$") {
                        $summary += "`n$line`n"
                    } else {
                      $summary += $line + "`n"
                    } 
                }
            }
        }
        $summary >> $env:GITHUB_STEP_SUMMARY
      }

  - name: Publish artifacts  
    if: ${{ !cancelled() }}
    uses: actions/upload-artifact@v4
    with:
      name: DeployablePackage
      path: output/CloudDeployablePackage_* 

The build itself completes successfully, but at the end of the RunPipeline step I consistently get the following error: Error: Unexpected error when running action (::Error::The property 'PACKAGE_NAME' cannot be found on this object. Verify that the property exists.)

[09:17:57][Invoke-FSCCompile] dem021
[09:17:59][Invoke-FSCCompile] Creating cloud runtime deployable package
[09:17:59][Invoke-FSCCompile] Starting package creation:
[09:18:03][Invoke-FSCCompile] C:\Users\runneradmin\AppData\Local\Temp\finOpsPackaging\134212366798410907
[09:18:03][Invoke-FSCCompile] Ending package creation
[09:18:03][Invoke-FSCCompile] Placing package to package output location
[09:18:03][Invoke-FSCCompile] Complete
::::::::::::::::::::::::::::
:: Compilationcomplete. ::
::::::::::::::::::::::::::::

Result : C:\Users\runneradmin\AppData\Local\Temp\finOpsPackaging\134212366798410907
Id : 537916
Exception :
Status : RanToCompletion
IsCanceled : False
IsCompleted : True
CreationOptions : None
AsyncState :
IsFaulted : False
AsyncWaitHandle : System.Threading.ManualResetEvent
CompletedSynchronously : False

METADATA_DIRECTORY D:\a\DEM021CopilotAgent\DEM021CopilotAgent\Metadata
FRAMEWORK_DIRECTORY c:\temp\fscps.tools_bld\packages\Microsoft.Dynamics.AX.Platform.CompilerPackage.7.0....
BUILD_OUTPUT_DIRECTORY c:\temp\fscps.tools_bld\bin
BUILD_FOLDER_PATH c:\temp\fscps.tools_bld
NUGETS_FOLDER c:\temp\fscps.tools_bld\packages
BUILD_LOG_FILE_PATH C:\Users\runneradmin\AppData\Local\Temp\Build.sln.msbuild.log
ARTIFACTS_LIST ["C:\temp\fscps.tools\_bld\artifacts\CloudDeployablePackage\TemplatePackage.dll...
[ 2026.04.21-09:18:15 ]: Execution is done.
Error: Unexpected error when running action (::Error::The property 'PACKAGE_NAME' cannot be found on this object. Verify that the property exists.)

Error: Process completed with exit code 1.

From the logs, the compilation and cloud package generation appear to complete correctly. However, it seems that the workflow expects a variable called PACKAGE_NAME, but this variable is not available after the solution build finishes.

My parameter JSON file looks like this:
{
"type": "FSCM",
"packageName": "DEM021",
"models": "DEM021",

"sourceFolder": "Metadata",
"metadataPath": "Metadata",

"buildVersion": "10.0.47",
"platformVersion": "10.0.47",
"ciBranches": "main,develop,release",

"createCloudPackage": true,
"createRegularPackage": false,

"deploymentScheduler": false,
"deploymentType": "cloud",
"buildPath": "Projects/AzureBuild/DEM021CopilotAgent"
}

Additional note:
If I change the parameters to create a regular package instead (i.e. enabling createRegularPackage and disabling createCloudPackage), the build succeeds and the workflow completes without errors.
However, I specifically need the action to create a cloud deployable package, because it must be deployed to a Unified Development Environment.
Is there something missing or incorrectly configured in my parameters or workflow that would explain why PACKAGE_NAME is not set when createCloudPackage is enabled?
Thanks in advance for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions