/localPCF

my local PCF repo

Primary LanguageTypeScript

How to run the sample components?

Follow the steps below to import and try the sample components in your model-driven or canvas app:

  1. Navigate to the folder on your computer where you have downloaded the sample components, and extract the .zip file.

  2. Open Developer Command Prompt for Visual Studio 2017 and navigate to the sample component folder in the extracted folder that you want to see it in runtime. For example, navigate to the <extracted_folder>/TS_IncrementComponent folder.

  3. Run the following command to get all the required dependencies:

    npm install
    
  4. Create a new folder using the command mkdir <folder name> inside the sample component folder and navigate into the folder using the command cd <folder name>.

  5. Create a new solution project inside the folder using the following command:

    pac solution init --publisher-name <Name of the publisher> --publisher-prefix <Publisher prefix>
    
  6. After the new solution project is created, refer to the location where the sample component is located. You can add the reference using the following command:

    pac solution add-reference --path <Path to the root of the sample component>
    
  7. To generate a zip file from your solution project, you need to cd into your solution project directory and build the project using the following command:

    msbuild /t:restore
    
  8. Again, run the command msbuild.

  9. The generated solution zip file will be available at Solution\bin\debug folder. Manually import the solution into your Common Data Service environment using the web portal once the zip file is ready. Alternatively, to import the solution using Power Apps CLI commands, see the Connecting to your environment and Deployment sections.

  10. Finally, to add code components to your model-driven and canvas apps, see Add components to model-driven apps and Add components to canvas apps.