microsoft / powerplatform-build-tools

Power Platform Build Tools automate common build and deployment tasks related to Power Platform. This includes synchronization of solution metadata (a.k.a. solutions) between development environments and source control, generating build artifacts, deploying to downstream environments, provisioning/de-provisioning of environments, and the ability to perform static analysis checks against your solution using the PowerApps checker service.
MIT License
198 stars 39 forks source link

pac solution sync does not bring down Plugin Package into the source #1073

Open chrispiasecki opened 1 week ago

chrispiasecki commented 1 week ago

Describe the bug When using pac solution sync, a Plugin Package is not being synced and missing in the unpacked solution directory.

To Reproduce Steps to reproduce the behavior:

  1. Create an empty solution
  2. Clone the solution using pac solution clone
  3. Register a Plugin Package via PRT and add it into the above solution
  4. Register a Plugin Step
  5. Sync the solution using pac solution sync -p Both -a
  6. Observe the pluginpackagesdirectory is not present. The plugin step registered against the plugin package/assembly is present in the SdkMessageProcessingStepsdirectory.

Expected behavior Plugin Packages should always be synced.

Desktop (please complete the following information):

Additional context Latest PAC CLI version (1.36.3+g76bcfe6) installed at the time of writing

ericregnier commented 1 week ago

Experiencing the same issue!

Workaround for now is running pac solution export and pac solution unpack pac solution export -n solname pac solution unpack -z solname.zip -ad -aw -f src -m Map.xml

chrispiasecki commented 1 week ago

I resolved the issue - the problem was that I originally had started with a regular plugin assembly, and the unpacked solution still had references to the old plugin assembly and step with the same name prior to converting it to a Plugin Package. I had to manually remove the plugin assembly and plugin step root components in the solution.xml file, and delete the plugin step under the sdkprocessingstep folder. Reran the sync which pulled it down correctly. I imagine it shouldn't be an issue if you started with a plugin package to begin with.

ericregnier commented 6 days ago

Thanks for that @chrispiasecki! I was hopeful that it would resolve it with these steps but still not working for me.... I only get the SdkMessageProcessingSteps.

Do you mind reopening this bug? It would avoid me creating a new one...

stas-sultanov commented 5 days ago

Same here.

pac solution clone does clone pluginpackages

pac solution sync does sync pluginpackages if only *.cdsproj does not contain reference to Plugin.csproj

pac solution sync does not sync pluginpackages if only *.cdsproj contain reference to Plugin.csproj and removes pluginpackages if they exist

stas-sultanov commented 5 days ago

@ericregnier tell please what map.xml you use in your workaround