pac pcf init --namespace CustomComponent --name PrintForm --template dataset
cd PrintForm
npm install- Sửa file
index.tsđể hiện Formin theo ý muốn. - Sửa file
ControlManifest.Input.xmlđể khai báo các property cần thiết.
npm run buildcd ..
pac solution init --publisher-name <TênPublisher> --publisher-prefix <Prefix>
cd SolutionsVí dụ:
pac solution init --publisher-name Crda32e --publisher-prefix crdfdpac solution add-reference --path ../Đảm bảo đường dẫn trỏ tới thư mục chứa file
.pcfprojcủa control.
pac solution build --path .- File solution
.zipsẽ nằm trongbin/Debug/hoặcbin/Release/.
- Vào Power Apps Maker Portal > Solutions > Import solution.
- Chọn file
.zipvừa build.
- Xem danh sách environment:
pac auth list
- Chọn environment:
pac auth select --index <số thứ tự>
- Kiểm tra environment hiện tại:
pac auth who
- Chạy trong thư mục chứa
.pcfproj:Ví dụ:pac pcf push --publisher-prefix <prefix>
pac pcf push --publisher-prefix crdfd
- Lỗi file bị khóa (EPERM: operation not permitted, unlink ...):
- Đóng mọi ứng dụng đang mở file, xóa file thủ công, hoặc khởi động lại máy.
- Lỗi add-reference/sai đường dẫn:
- Đảm bảo dùng đường dẫn tới thư mục chứa
.pcfproj.
- Đảm bảo dùng đường dẫn tới thư mục chứa
- Lỗi import solution: component chưa có trong hệ thống:
- Đảm bảo đã add-reference và build solution đúng quy trình.
Tài liệu tham khảo: