BeerLike.PackageDeployer 0.0.4

dotnet add package BeerLike.PackageDeployer --version 0.0.4
                    
NuGet\Install-Package BeerLike.PackageDeployer -Version 0.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BeerLike.PackageDeployer" Version="0.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BeerLike.PackageDeployer" Version="0.0.4" />
                    
Directory.Packages.props
<PackageReference Include="BeerLike.PackageDeployer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BeerLike.PackageDeployer --version 0.0.4
                    
#r "nuget: BeerLike.PackageDeployer, 0.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BeerLike.PackageDeployer@0.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BeerLike.PackageDeployer&version=0.0.4
                    
Install as a Cake Addin
#tool nuget:?package=BeerLike.PackageDeployer&version=0.0.4
                    
Install as a Cake Tool

BeerLike Package Deployer

This project is still in development. Use at your own risk in production environments.

A .NET library that provides custom extensions for Power Platform Package Deployer projects.

NuGet Version License: MIT

Overview

Currently, the library provides the following features:

  • Declarative Team Security Role Assignment — Assign (and optionally remove) security roles to teams via JSON configuration
  • Declarative Column Security Profile Assignment — Assign (and optionally remove) column security profiles (field-level security) to teams via JSON configuration

Usage

1. Install the NuGet package

Install the NuGet package in your Package Deployer project:

dotnet add package BeerLike.PackageDeployer

Or just add the package reference to your Package Deployer project>

<PackageReference Include="BeerLike.PackageDeployer" Version="0.0.*" />

2. Update Your PackageImportExtension Class

Change your package class to inherit from BeerLike.PackageDeployer.PackageExtension instead of the default ImportExtension. The custom PackageExtension class inherits from ImportExtension so we don't lose any of the default functionality.

using BeerLike.PackageDeployer;

namespace YourNamespace;

public class PackageImportExtension : PackageExtension
{
...
}
2.1 Set props and targets

Add the following properties and target to your package deployer .csproj file to enable build-time JSON validation and auto-initialization:


<PropertyGroup>
  <TeamRolesConfig>$(MSBuildProjectDirectory)\PkgAssets\TeamRoles.json</TeamRolesConfig>
  <TeamCspsConfig>$(MSBuildProjectDirectory)\PkgAssets\TeamCsps.json</TeamCspsConfig>
</PropertyGroup>


<Target Name="InitializePackageConfigs" BeforeTargets="Build" DependsOnTargets="ValidatePackageConfigs" />

The properties define the paths to the JSON configuration files.

The target runs a task that either creates the config files if they don't exist in given paths (specified by the props) or validates them againts the JSON schemas.

Feel free to change the paths to the JSON configuration files to your liking but make sure to they are contained in the your package assets folder (default is PkgAssets).

2.2. Build the package deployer project

If you set the props and targets as described above, build the package deployer project locally once and the config files will be created in the given paths.

3. Set your configuration

If you skipped the step 2, create manually json files in the package assets folder (default is PkgAssets).

If you completed the step 2, the config files already exist.

Set your declarative configuration as in the examples in Configuration.

4. Invoke tasks from your PackageImportExtension class

To execute the custom tasks, invoke them in the appropriate stage of the package import process.

public override void AfterPrimaryImport()
{
    //GetImportPackageDataFolderName is a property of the default ImportExtension class
    SyncTeamRoles(GetImportPackageDataFolderName + "/TeamRoles.json");
    SyncTeamCsps(GetImportPackageDataFolderName + "/TeamCsps.json");
    return true;
}

Configuration

Team Security Roles (default file name: TeamRoles.json)

Assign security roles to teams declaratively:

[
  {
    "team": "Sales Team",
    "removeUnassigned": false,
    "securityRoles": [
      "00000000-0000-0000-0000-000000000001",
      "00000000-0000-0000-0000-000000000002"
    ]
  },
  {
    "team": "00000000-0000-0000-0000-000000000003",
    "removeUnassigned": true,
    "securityRoles": [
      "00000000-0000-0000-0000-000000000004"
    ]
  }
]
Property Type Required Description
team string Yes Team identifier — can be the team name or team ID (GUID)
securityRoles string[] Yes Array of security role IDs (GUIDs) to assign
removeUnassigned boolean No If true, removes any security roles from the team that are not in the securityRoles array. Default: false

Team Column Security Profiles (default file name: TeamCsps.json)

Assign column security profiles (field-level security) to teams:

[
  {
    "team": "Sales Team",
    "removeUnassigned": false,
    "columnSecurityProfiles": [
      "00000000-0000-0000-0000-000000000001",
      "00000000-0000-0000-0000-000000000002"
    ]
  }
]
Property Type Required Description
team string Yes Team identifier — can be the team name or team ID (GUID)
columnSecurityProfiles string[] Yes Array of column security profile IDs (GUIDs) to assign
removeUnassigned boolean No If true, removes any column security profiles from the team that are not in the columnSecurityProfiles array. Default: false

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Product Compatible and additional computed target framework versions.
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.4 1,271 3/6/2026
0.0.3 1,686 12/7/2025
0.0.2 128 12/6/2025
0.0.1 132 12/6/2025