microsoft / powercat-creator-kit

This toolkit helps create well-designed Power App experiences on the web & mobile. It contains a component library; PCF controls and other utilities that increase developer productivity.
MIT License
296 stars 49 forks source link

[BUG]: Removing Fluent Nav from app but there is still dependency on Fluent Nav in the solution package #462

Open milkcoffeecat2024 opened 1 month ago

milkcoffeecat2024 commented 1 month ago

Describe the bug We had imported the Creator Kit into source environment and utilized the Fluent Nav components in our application. Subsequently, we removed Fluent Nav from the app. Despite ensuring that the application was free of Fluent Nav component, when we checked the application's dependencies, the dependency on Fluent Nav still persisted. This prevented us from importing the application into the target environment where the Creator Kit cannot be imported due to limited privileges.

Additionally, we employed a reverse engineering approach for testing. We developed a test application in source environment, where the Creator Kit was already installed, and integrated the Fluent Nav component into it and bound the component to a SharePoint List. Surprisingly, when we examined the dependencies, this test application showed no dependencies, even though it included the Fluent Nav custom component.

To Reproduce Steps to reproduce the behavior:

A. Create an app and solution with the Fluent Nav component

  1. Install Creator Kit at source environment.
  2. Create an app using Fluent Nav
  3. Save and publish the app
  4. Create a solution with the app

B.Step to check the solution dependency:

  1. Go to the solution of the app
  2. Click 'Apps'
  3. Click the three dots next to the app
  4. Click 'Advanced'
  5. Click 'Show Dependencies'
  6. Click 'Uses'
  7. Scroll down to Creator Kit
  8. .cat_PowerCAT.Nav is shown as the dependency

C. Remove the component

  1. Afte go back to the app studio
  2. Remove the Fluent Nav component
  3. Save and Publish the app

D. Repeat steps to check the solution dependency:

  1. Click 'Apps'
  2. Click the three dots next to the app
  3. Click 'Advanced'
  4. Click 'Show Dependencies'
  5. Click 'Uses'
  6. Scroll down to Creator Kit
  7. cat_PowerCAT.Nav is still shown as the dependency

E. Install the solution to target environment (not installed with Creator Kit)

  1. Export the solution with the app free of Fluent Nav as a managed solution
  2. Download the solution (in .zip)
  3. Go to target environment
  4. Click 'Solutions'
  5. Click 'Import Solution'
  6. Select the solution package just downloaded
  7. Follow the import instruction on screen
  8. An error appears show "The following solution cannot be imported: {Solution Name}. Some dependencies are missing. The missing dependencies are : cat_PowerCAT.Nav"

Reversed engineering approach for testing: 1 Create an app and solution without using the Fluent Nav component

  1. Check the solution dependency
  2. The Dependency show no depdency of Creator Kit
  3. Go back to the app
  4. Add Fluent Nav to the app
  5. Bind the Fluent Nav with SharePoint List
  6. Save and publish the app
  7. Check the solution dependency
  8. Fluent Nav is NOT shown as the dependencies

Expected behavior When adding or removing the Fluent Nav, the solution dependency should be reflected accordingly:

Additional context The issue we faced is similar to these posts: https://github.com/microsoft/powercat-creator-kit/discussions/206 https://powerusers.microsoft.com/t5/Building-Power-Apps/Trying-to-fully-remove-dependency-to-the-Creator-Kit-from-my/td-p/2152496

But for us, the component is Fluent Nav and the dependency does not go away in the next day. It persists until today.

AB#3119

denise-msft commented 1 week ago

@milkcoffeecat2024 if you create a duplicate of the app (in the studio Save > Save As), does the duplicate also have the dependency ghost issues you're seeing?