Common issues and workarounds

Here are some common issues that you might come across while using the Power Apps component framework and Microsoft Power Platform CLI.

Note

Unsure about entity vs. table? See Developers: Understand terminology in Microsoft Dataverse.

Component changes are not reflected after the updated solution import?

Update the component version (minor or patch) in the component manifest file (for example, 1.0.0 to 1.0.1). Every update in the component needs a component version bump to be reflected on the Microsoft Dataverse server.

 <control namespace="SampleNamespace" constructor="TSLinearInputControl" 
   version="1.0.1" 
    display-name-key="TSLinearInputControl_Display_Key" description-key="TSLinearInputControl_Desc_Key" control-type="standard">

Msbuild error MSB4036

  • The name of the task in the project file is same as the name of the task class.
  • The task class is public and implements the Microsoft.Build.Framework.ITask interface.
  • The task is correctly declared with <UsingTask> in the project file or in the *.tasks files located in the path directory.

Workaround:

  • Open Visual Studio Installer.
  • For Visual Studio 2017 or higher, select Modify.
  • Select Individual Components.
  • Under Code Tools, check NuGet targets & Build Tasks.

Note

We will be constantly adding common issues and workarounds as we come across during the development process. If you encounter an issue and have a workaround and you think that is helpful, raise the issue here or raise a pull request so that we can review and add it to the list.

Issues while updating existing code components

  • If you have created a code component using the CLI version 0.1.817.1 or earlier and want to ensure that the latest build and debug modules are being used, make the updates to the package.json file as shown below:

    "dependencies": { "@types/node": "^10.12.18", "@types/powerapps-component-framework": "1.1.0"}, "devDependencies": { "pcf-scripts": "~0", "pcf-start": "~0" } 
    

Error: Failed to retrieve information about Microsoft.PowerApps.MSBuild.Pcf from remote source when the build fails for authorization issues.

Workaround

  • Open the NuGet.Config file from %APPDATA%\NuGet. The feed from which the user is getting the error should be present in this file.

  • Remove the feed from the NuGet.Config file or generate a PAT token and add it to the Nuget.Config file. For example:

    <?xml version="1.0" encoding="utf-8"?>  
    <configuration>  
    <packageSources>  
        <add key="YourFeedName" value="https://contoso.com/_packaging/YourFeedName/nuget/v3/index.json" />  
     </packageSources>  
     <packageSourceCredentials>  
     <YourFeedName>  
     <add key="Username" value="anything" />  
     <add key="Password" value="User PAT" />  
       </YourFeedName>  
       </packageSourceCredentials>  
      </configuration>
    

Web resource size is too large

Error Import Solution Failed: Web resource content size is too big.

Workaround

  • Build the .pcfproj as release configuration, which sets the web pack to production mode using the command
    msbuild /property:configuration=Release
    
  • Run the msbuild command with an extra property as shown below:
    msbuild /p:PcfBuildMode=production
    
  • Edit the .pcfproj to always build the web pack in production mode by setting the property PcfBuildMode to production:
    <PropertyGroup>
      <Name>TS_ReactStandardControl</Name>
      <ProjectGuid>0df84c56-2f55-4a80-ac9f-85b7a14bf378</ProjectGuid>
      <OutputPath>$(MSBuildThisFileDirectory)out\controls</OutputPath>
      <PcfBuildMode>production</PcfBuildMode>
    </PropertyGroup>
    

When running Power Apps checker with the solution built using CLI tooling in default configuration

Error: Do not use the eval function or its functional equivalents

This warning is by design since the default msbuild configuration is Configuration=Debug. This in turn instructs web pack (used to bundle the code component) to package in development mode, which emits eval().

Workaround

Re build the solution file using the following either of the commands and reimport the solution into Dataverse.

msbuild/property:configuration:Release
npm run build -- --buildMode production

Canvas dataset paging is not reset when external filter applied

Currently there is an issue with canvas app datasets bound to code components. When the dataset is filtered externally to the code component using PowerFX, the page should be reset to the first page, and the hasPreviousPage should be set to false. This is the functionality inside model-driven apps. This does not happen for canvas apps and so the code components cannot reset the paging and the page numbers can get out of sync.

Workaround

No workaround as of now. A fix for this issue is being deployed.