v1.3.0 - Fix manifest: use correct CategoryTypeName for UIExtension features
This commit is contained in:
+22
-9
@@ -81,7 +81,6 @@ Write-Host "Build successful: $pluginDll" -ForegroundColor Green
|
||||
# --- Generate Manifest ---
|
||||
Write-Host "`nGenerating manifest..." -ForegroundColor Yellow
|
||||
|
||||
# Copy all needed DLLs to build output for ManifestGenerator type resolution
|
||||
foreach ($dll in $requiredDlls) {
|
||||
Copy-Item (Join-Path $DiscoBinPath $dll) $buildOutput -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
@@ -91,8 +90,6 @@ foreach ($dep in $extraDlls) {
|
||||
if (Test-Path $depPath) { Copy-Item $depPath $buildOutput -Force -ErrorAction SilentlyContinue }
|
||||
}
|
||||
|
||||
# Try the real ManifestGenerator first - it uses reflection to find [PluginFeature] attributes
|
||||
# and generates the correct manifest format including UIExtension features
|
||||
$useManifestGen = $false
|
||||
$manifestGenExe = Join-Path $DiscoBinPath "Disco.Services.Plugins.ManifestGenerator.exe"
|
||||
if (-not (Test-Path $manifestGenExe)) {
|
||||
@@ -112,9 +109,11 @@ if (Test-Path $manifestGenExe) {
|
||||
|
||||
if (-not $useManifestGen) {
|
||||
$version = [System.Reflection.AssemblyName]::GetAssemblyName($pluginDll).Version
|
||||
# Manual manifest - do NOT include Features array as the format must match
|
||||
# exactly what ManifestGenerator produces. Without it, features won't auto-register
|
||||
# but the web handler comparison dashboard still works fully.
|
||||
|
||||
# CategoryTypeName must match what ManifestGenerator produces:
|
||||
# For UIExtensionFeature<T>, the generic type definition FullName is UIExtensionFeature`1
|
||||
$uiExtCategoryTypeName = "Disco.Services.Plugins.Features.UIExtension.UIExtensionFeature``1"
|
||||
|
||||
$manifest = [ordered]@{
|
||||
Id = $PluginName
|
||||
Name = "AD Compare"
|
||||
@@ -125,11 +124,25 @@ if (-not $useManifestGen) {
|
||||
TypeName = "Disco.Plugins.ADCompare.ADComparePlugin"
|
||||
ConfigurationHandlerTypeName = "Disco.Plugins.ADCompare.ConfigurationHandler.ADCompareConfigurationHandler"
|
||||
WebHandlerTypeName = "Disco.Plugins.ADCompare.WebHandler.ADCompareWebHandler"
|
||||
Features = @(
|
||||
[ordered]@{
|
||||
Id = "ADCompareDeviceUI"
|
||||
Name = "Device Page - AD Compare"
|
||||
TypeName = "Disco.Plugins.ADCompare.Features.DeviceUIExtension"
|
||||
PrimaryFeature = $false
|
||||
CategoryTypeName = $uiExtCategoryTypeName
|
||||
},
|
||||
[ordered]@{
|
||||
Id = "ADCompareUserUI"
|
||||
Name = "User Page - AD Compare"
|
||||
TypeName = "Disco.Plugins.ADCompare.Features.UserUIExtension"
|
||||
PrimaryFeature = $false
|
||||
CategoryTypeName = $uiExtCategoryTypeName
|
||||
}
|
||||
)
|
||||
}
|
||||
$manifest | ConvertTo-Json -Depth 5 | Set-Content (Join-Path $buildOutput "manifest.json") -Encoding UTF8
|
||||
Write-Host "Manual manifest.json created (without UIExtension features)" -ForegroundColor Yellow
|
||||
Write-Host " Note: For full UIExtension support on device/user pages," -ForegroundColor Yellow
|
||||
Write-Host " install Disco.Services.Plugins.ManifestGenerator.exe" -ForegroundColor Yellow
|
||||
Write-Host "Manual manifest.json created with UIExtension features" -ForegroundColor Green
|
||||
}
|
||||
|
||||
# --- Package ---
|
||||
|
||||
Reference in New Issue
Block a user