PowerApps Component Framework PCF 部署
- 2020 年 6 月 15 日
- 筆記
- Power Platform
PowerApps PCF 可以滿足複雜的功能, 我們可以使用PCF來創建複雜的PowerApps。
這裡附上微軟的package code componet 教程(//docs.microsoft.com/en-us/powerapps/developer/component-framework/import-custom-controls)
步驟
1. 首先我們需要創建solution文件夾,並且進入到創建的solution文件夾中
mkdir GoogleMapSolution
cd c://xxx/xxx/GoogleMapSolution
2.. 其次我們需要創建publisher 和 prefix
pac solution init –publisher-name PCFGMap –publisher-prefix PCFGMap
3. 我們需要把solution文件夾和code 文件夾做關聯
pac solution add-reference –path C:\Projects\GitHub\PowerApps\PCF\Controls\PCFGoogleMap
4. 接下來需要運行 MS Build
msbuild /t:build /restore
ps: 建議直接使用「Developer Command Prompt for VS 2017」 來運行 MSBuild
/restore 只是第一次使用, 隨後的build不需要。
如果需要release:sbuild /p:configuration=Release
5. 接下來我們需要把生成的zip文件上傳到PowerApps中的solution
6. 接下來需要進入admin.powerplatform.com 中打開PowerApps component framework 功能
ps: 切記這個步驟不能省略, 如果省略則不能添加code component 到 PowerApps canvas中
7. 接下來我們進入到canvas app中。
在insert -> Custom 中import component. 並且切換到code中選擇剛才import的component.
8. 添加code component到screen中