Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam PL-400 All Questions

View all questions & answers for the PL-400 exam

Exam PL-400 topic 2 question 20 discussion

Actual exam question from Microsoft's PL-400
Question #: 20
Topic #: 2
[All PL-400 Questions]

DRAG DROP -
A company uses Common Data Service (CDS) and manages their engineers using a model-driven app.
You create a new reusable custom component named Component1 by using the Power Apps component framework (PCF).
You need to package Component1 for deployment into the model-driven app.
Which three commands should you run in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Step 1: pac solution init --publisher-name <publisher> --publisher-prefix <prefix>
Create a new solutions project using the following command. The solution project is used for bundling the code component into a solution zip file that is used for importing into Dataverse. pac solution init --publisher-name developer --publisher-prefix dev
Step 2: pac solution add-reference --path <control-path>
Once the new solution project is created, refer the Solutions folder to the location where the created sample component is located. You can add the reference using the command shown below. This reference informs the solution project about which code components should be added during the build. You can add references to multiple components in a single solution project. pac solution add-reference --path c:\downloads\mysamplecomponent
Step 3: msbuild /t:build /restore
To generate a zip file from the solution project, go into your solution project directory and build the project using the following command. This command uses
MSBuild to build the solution project by pulling down the NuGet dependencies as part of the restore. Use the /restore only for the first time when the solution project is built. For every build after that, you can run the command msbuild. msbuild /t:build /restore
Reference:
https://docs.microsoft.com/en-us/powerapps/developer/component-framework/import-custom-controls

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
lesiris
Highly Voted 3 years, 2 months ago
1. pac solution init --publisher-name mslearn --publisher-prefix msl 2. pac solution add-reference --path .. 3. msbuild /t:build /restore Provided answer is correct https://docs.microsoft.com/en-us/learn/modules/build-power-app-component/2-package-code-component
upvoted 30 times
ppguru
2 years, 9 months ago
Provided answer is correct indeed
upvoted 1 times
...
...
At09
Most Recent 1 year ago
>pac solution init --publisher-name mslearn --publisher-prefix msl >pac solution add-reference --path .. >msbuild /t:build /restore
upvoted 2 times
...
jkaur
1 year, 2 months ago
answers are correct
upvoted 1 times
...
Emehoku
1 year, 6 months ago
This question was on my 4/7/23 exam
upvoted 2 times
Prem1942
1 year, 1 month ago
I never visited site after appearing in exam :)
upvoted 1 times
b12f0be
1 year ago
So thanks to guy above for more info :)
upvoted 1 times
...
...
...
Muzera
2 years, 3 months ago
correct
upvoted 1 times
...
Kalimho
2 years, 3 months ago
in exam 2022.07.21
upvoted 1 times
...
Mateusz_M
3 years, 3 months ago
There's wrong command for initializing project, proper syntax is below: pac solution init --publisher-name developer --publisher-prefix dev On the screenshot there's no space after init and there should be two dashes.
upvoted 1 times
...
kikakiko
3 years, 4 months ago
answer is correct. Link: https://docs.microsoft.com/en-us/powerapps/developer/component-framework/import-custom-controls
upvoted 2 times
...
Ghalandor90
3 years, 4 months ago
but the third is not npm run build?
upvoted 1 times
KAL18
2 years, 11 months ago
npm run build is to build/compile the component and it doesn't generates zip file. To generate your solution's zip file, use Microsoft Build Engine, or MSBuild for short.
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...