Skip to content

A collection of .NET templates for creating Power Platform components using a code-first approach. These templates will allow you to quickly scaffold projects with pre-configured settings and structure.

License

Notifications You must be signed in to change notification settings

TALXIS/tools-devkit-templates

Repository files navigation

Power Platform .NET Templates

Warning

This project is currently in a development phase and not ready for production use. While we actively use these tools internally, our aim is to share and collaborate with the broader community to refine and enhance their capabilities. We are in the process of gradually open-sourcing the code, removing internal dependencies to make it universally applicable. At this stage, it serves as a source of inspiration and a basis for collaboration. We welcome feedback, suggestions, and contributions through pull requests.

If wish to use this project for your team, please contact us at hello@networg.com for a personalized onboarding experience and customization to meet your specific needs.

Caution

Only use this if you understand the standard platform customization capabilities. Using these templates with parameter combinations other than those documented here might generate invalid source code, which could still be importable to Dataverse. In some situations, this could cause your environment to become irreversibly corrupted.

Goal

The primary objective of this NuGet package is to help Power Platform developers scaffold Power Platform components using a code-first approach.

Guide

You can refer to a VS Code snippets file used by @TomProkop for conference demos.

Dev machine setup

# If you're using .NET CLI for the first time, you might need to set up nuget.org as a package source
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org

# Install PowerShell 7+ to have "pwsh" executable present in your terminal
# To support running the templates cross-platform "pwsh" is used instead of "powershell.exe"
# You can use other installation methods
dotnet tool install --global PowerShell

# Install the template package to your machine
dotnet new install TALXIS.DevKit.Templates.Dataverse

Solutions

Note

Template commands are designed to be run in the folder where *.*proj is located. Use --output parameter if your working directory is different.

Initialize a new empty solution:

dotnet new pp-solution `
--output "src/Solutions.Model" `
--PublisherName "tomas" `
--PublisherPrefix "tom" `
--allow-scripts yes

Tables

Create a new standard table:

dotnet new pp-entity `
--output "src/Solutions.Model" `
--Behavior New `
--PublisherPrefix "tom" `
--LogicalName "location" `
--LogicalNamePlural "locations" `
--DisplayName "Location" `
--DisplayNamePlural "Locations" `
--SolutionRootPath "Declarations" `
--allow-scripts yes

Create a new activity table:

dotnet new pp-entity `
--output "src/Solutions.Model" `
--EntityType "Activity" `
--Behavior "New" `
--PublisherPrefix "tom" `
--LogicalName "shiftevent" `
--LogicalNamePlural "shiftevents" `
--DisplayName "Shift Event" `
--DisplayNamePlural "Shift Events" `
--SolutionRootPath "Declarations" `
--allow-scripts yes

Add an existing custom table to a solution:

dotnet new pp-entity `
--output "src/Solutions.Presentation" `
--Behavior "Existing" `
--PublisherPrefix "tom" `
--LogicalName "shiftevent" `
--DisplayName "Shift Event" `
--SolutionRootPath "Declarations" `
--allow-scripts yes

Add an existing system table to a solution:

dotnet new pp-entity `
--output "src/Solutions.Presentation" `
--Behavior "Existing" `
--IsSystemEntity "true"  `
--LogicalName "account" `
--DisplayName "Account" `
--SolutionRootPath "Declarations" `
--allow-scripts yes

Tip

You can add component schema validation to your build process using Power Platform MSBuild targets.

Collaboration

We are happy to collaborate with developers and contributors interested in enhancing Power Platform development processes. If you have feedback, suggestions, or would like to contribute, please feel free to submit issues or pull requests.

Local building and debugging

Using your local version of templates

Run the following terminal command in the folder src/Dataverse/templates:

dotnet new install "." --force

Contact us

For further information or to discuss potential use cases for your team, please reach out to us at hello@networg.com.

About

A collection of .NET templates for creating Power Platform components using a code-first approach. These templates will allow you to quickly scaffold projects with pre-configured settings and structure.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published