Skip to content

Commit a8b25a2

Browse files
committed
update readme
1 parent e3e331a commit a8b25a2

File tree

11 files changed

+72
-2
lines changed

11 files changed

+72
-2
lines changed

Samples/StoragePickers/README.md

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,81 @@
66

77
## 📸 Screenshot of App Layout
88

9-
![img](screenshot-storage-pickers.png)
9+
![img](images/screenshot-storage-pickers.png)
10+
11+
## Deploy the Sample Packaged App Locally
12+
13+
1. Open `cpp-sample/FilePickersAppSinglePackaged.sln` or `cs-sample/FilePickersAppSinglePackaged.sln` in Visual Studio, right click on the project, select "Package and Publish" > "Create App Package"
14+
15+
![img](images/deploy1.png)
16+
17+
2. Select Sideloading > Next
18+
19+
![img](images/deploy2.png)
20+
21+
3. Create and Trust your own test certification
22+
23+
![alt text](images/deploy3.png)
24+
25+
![alt text](images/deploy4.png)
26+
27+
4. Create package
28+
29+
![alt text](images/deploy5.png)
30+
31+
5. Open the built result
32+
33+
![alt text](images/deploy6.png)
34+
35+
5. Run Install.ps1 in powershell
36+
37+
![alt text](images/deploy7.png)
38+
39+
*Note:*
40+
41+
If encountering error like below:
42+
43+
> Add-AppxPackage: Cannot find path 'C:\FilePickersAppSinglePackaged_1.0.1.0_x64_Debug_Test\Dependencies\x86\Microsoft.VCLibs.x86.Debug.14.00.appx C:\FilePickersAppSinglePackaged_1.0.1.0_x64_Debug_Test\Dependencies\x86\Microsoft.VCLibs.x86.Debug.14.00.Desktop.appx C:\FilePickersAppSinglePackaged_1.0.1.0_x64_Debug_Test\Dependencies\x64\Microsoft.VCLibs.x64.Debug.14.00.appx C:\FilePickersAppSinglePackaged_1.0.1.0_x64_Debug_Test\Dependencies\x64\Microsoft.VCLibs.x64.Debug.14.00.Desktop.appx' because it does not exist.
44+
45+
Replace lines 483-491 in `Add-AppDevPackage.ps1` with below script and try again:
46+
47+
```ps
48+
if ($DependencyPackages.FullName.Count -gt 0)
49+
{
50+
Write-Host $UiStrings.DependenciesFound
51+
$DependencyPackages.FullName
52+
53+
54+
# Install dependencies one by one first
55+
foreach ($dep in $DependencyPackages.FullName) {
56+
echo "Installing dependency: $dep"
57+
try {
58+
Add-AppxPackage -Path $dep -ForceApplicationShutdown
59+
echo "Successfully installed: $dep"
60+
} catch {
61+
echo "Failed to install dependency: $dep - $($_.Exception.Message)"
62+
}
63+
}
64+
65+
# Now install the main package
66+
echo "Installing main package: $($DeveloperPackagePath.FullName)"
67+
Add-AppxPackage -Path $DeveloperPackagePath.FullName -ForceApplicationShutdown
68+
}
69+
```
70+
71+
Screenshot of this error:
72+
![alt text](images/deploy8.png)
73+
74+
Screenshot of this mitigation:
75+
76+
![alt text](images/deploy9.png)
77+
78+
Once the dependency *.appx files are installed, this project can be smoothly debugged in Visual Studio.
79+
1080

1181
## 🚀 Run
1282

13-
1. Open `cpp-sample/FilePickersAppSinglePackaged.sln` or `cs-sample/FilePickersAppSinglePackaged.sln` in Visual Studio 2022.
83+
1. Open `cpp-sample/FilePickersAppSinglePackaged.sln` or `cs-sample/FilePickersAppSinglePackaged.sln` in Visual Studio.
1484
1. Restore NuGet packages and ensure the Windows App SDK 1.8 runtime is installed locally.
1585
1. Build and run.
1686

71.5 KB
Loading
29.4 KB
Loading
44 KB
Loading
51.6 KB
Loading
57.6 KB
Loading
28.3 KB
Loading
46.3 KB
Loading
50 KB
Loading
213 KB
Loading

0 commit comments

Comments
 (0)