microsoft / microsoft/powerplatform-vscode
`pac solution sync` does not honour packagetype in solution.xml
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 277
- Forks
- 60
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 14
Description
If I clone a solution with unmanaged package type when I subsequently perform a solution sync I'd expect only the unmanaged solution to be cloned and the package type to stay as unmanaged. This does not happen, the unmanaged and managed solutions are exported and the solution is unpacked in 'both' mode.
Similarly, if I initially cloned in managed mode I'd expect that to be remembered and honoured by any future pac solution sync.
To reproduce:
pac solution clone --packagetype unmanaged --solution myAmazingThing- Notice that
<managed>0</managed>is in Other\Solution.xml indicating solution is of the unmanaged export style - Now sync
pac solution sync
Expected result
- A single unmanaged export is performed
- Solution.xml should be unchanged, and still have
<managed>0</managed>
Actual result
- Two solution exports are performed (unmanaged and managed)
- Solution.xml is changed and now in 'both' mode, i.e.
<managed>2</managed>
Workaround
Remember to type pac solution sync --packagetype unmanaged with the correct package type (as appropriate)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the pac solution sync command and how it determines packagetype after pac solution clone. Compare the resulting exports and Other\Solution.xml values for managed, unmanaged, and both modes. Done means sync performs only the remembered export and preserves the existing <managed> value without requiring an explicit --packagetype.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100