Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions data.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"appx.dsc.extension.json",
"appx-discover.ps1",
"dsc.exe",
"dsc-bicep-ext.exe",
"dsc_default.settings.json",
"dsc.settings.json",
"dscecho.exe",
Expand Down Expand Up @@ -429,6 +430,16 @@
"Binaries": [
"y2j"
]
},
{
"Name": "dsc-bicep-ext",
"Kind": "Extension",
"RelativePath": "dsc-bicep-ext",
"SupportedPlatformOS": "Windows",
"IsRust": true,
"Binaries": [
"dsc-bicep-ext"
]
Comment on lines +433 to +442
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data.build.json defines the dsc-bicep-ext project as Kind: "Extension" and SupportedPlatformOS: "Windows", but the repository’s dsc-bicep-ext/.project.data.json currently declares it as Kind: "CLI" with no SupportedPlatformOS restriction. Since Import-DscBuildData -RefreshProjects rebuilds the project list from .project.data.json, this new entry will be ignored in that common path, and the mismatch can lead to confusing/unstable build behavior depending on whether -RefreshProjects is used. Align the kind/platform metadata between data.build.json and dsc-bicep-ext/.project.data.json (or remove the redundant project entry here if .project.data.json is intended to be the source of truth).

Suggested change
},
{
"Name": "dsc-bicep-ext",
"Kind": "Extension",
"RelativePath": "dsc-bicep-ext",
"SupportedPlatformOS": "Windows",
"IsRust": true,
"Binaries": [
"dsc-bicep-ext"
]

Copilot uses AI. Check for mistakes.
}
]
}
23 changes: 17 additions & 6 deletions helpers.build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ function Build-DscMsixPackage {
)

begin {
if ($IsWindows) {
if (-not $IsWindows) {
throw "MSIX packaging is only supported on Windows"
}
if ($null -eq $BuildData) {
Expand Down Expand Up @@ -1884,12 +1884,18 @@ function Build-DscMsixPackage {
$arch = ($architecture -eq 'aarch64-pc-windows-msvc') ? 'arm64' : 'x64'

# Appx manifest needs to be in root of source path, but the embedded version needs to be updated
# cp-459155 is 'CN=Microsoft Windows Store Publisher (Store EKU), O=Microsoft Corporation, L=Redmond, S=Washington, C=US'
# authenticodeFormer is 'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'
$releasePublisher = 'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'
# Retrieve manifest and set version correctly
$appxManifest = Get-Content "$PSScriptRoot\packaging\msix\AppxManifest.xml" -Raw
$appxManifest = $appxManifest.Replace('$VERSION$', $ProductVersion).Replace('$ARCH$', $Arch).Replace('$PRODUCTNAME$', $productName).Replace('$DISPLAYNAME$', $displayName).Replace('$PUBLISHER$', $releasePublisher)
if ($Release) {
# CP-459155 is 'CN=Microsoft Windows Store Publisher (Store EKU), O=Microsoft Corporation, L=Redmond, S=Washington, C=US'
# authenticodeFormer is 'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'
$publisher = 'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'
} else {
# For debug builds, use a self-signed developer identity per
# https://learn.microsoft.com/en-us/windows/msix/package/unsigned-package
$publisher = 'CN=AppModelSamples, OID.2.25.311729368913984317654407730594956997722=1'
}
$appxManifest = $appxManifest.Replace('$VERSION$', $ProductVersion).Replace('$ARCH$', $Arch).Replace('$PRODUCTNAME$', $productName).Replace('$DISPLAYNAME$', $displayName).Replace('$PUBLISHER$', $publisher)
# Remove the output directory if it already exists, then recreate it.
$msixTarget = $artifactDirectory.MsixTarget
if (Test-Path $msixTarget) {
Expand Down Expand Up @@ -1970,7 +1976,12 @@ function Build-DscMsixPackage {
if ($LASTEXITCODE -ne 0) {
throw "Failed to create msix package"
}
Write-Host -ForegroundColor Green "`nMSIX package is created at $packageName"

if ($Release) {
Write-Host -ForegroundColor Green "`nMSIX package is created at $packageName"
} else {
Write-Host -ForegroundColor Green "`nInstall the debug MSIX package with:`nAdd-AppxPackage -AllowUnsigned -Path $packageName"
}
}
}

Expand Down
11 changes: 11 additions & 0 deletions packaging/msix/AppxManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@
<uap:VisualElements DisplayName="$DISPLAYNAME$" Description="DesiredStateConfiguration (DSC) enables a declarative model for configuration, also known as configuration as code." BackgroundColor="transparent" Square150x150Logo="assets\Square150x150Logo.png" Square44x44Logo="assets\Square44x44Logo.png">
</uap:VisualElements>
</Application>
<Application Id="BicepExt" Executable="dsc-bicep-ext.exe" EntryPoint="Windows.FullTrustApplication">
<Extensions>
<uap3:Extension Category="windows.appExecutionAlias" EntryPoint="Windows.FullTrustApplication" Executable="dsc-bicep-ext.exe">
<uap3:AppExecutionAlias>
<desktop:ExecutionAlias Alias="dsc-bicep-ext.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>
</Extensions>
<uap:VisualElements DisplayName="DSC Bicep Extension" Description="gRPC server for Bicep extensibility with DSC." BackgroundColor="transparent" Square150x150Logo="assets\Square150x150Logo.png" Square44x44Logo="assets\Square44x44Logo.png">
</uap:VisualElements>
</Application>
</Applications>

<Capabilities>
Expand Down
Loading