WindowsAppSDK
WindowsAppSDK copied to clipboard
Windows Update Broke PhiSilica
After updating to the latest Windows Insider this morning, one of which included an update to the PhiSilica model:
I get this error:
System.UnauthorizedAccessException
HResult=0x80070005
Message=Access is denied.
Access is denied.
When doing either chat inference or embeddings:
var result = await languageModel.GenerateResponseAsync(options, prompt);
var embeddingResult = await languageModel.GenerateEmbeddingVectorAsync(...);
Using v1.7.250127003-experimental3.
Right now, nothing works.
i'm running into the same error (i think) in WPF, with both 1.7 and 1.8. This is the minimal example from https://learn.microsoft.com/en-us/windows/ai/apis/get-started?tabs=winget%2Cwpf (note no manifest file in WPF, and i had to fix the duplicated variable name in the second wpf tab)
edit: i should note it works fine for me in WinUI3 apps
/feedbackhubWCR
Looks like our automated response has some bugs. Please follow these instructions: Could you please submit this issue through Feedback Hub (press [Windows key]+[F])? Once you've done that, share the link here so we can track your issue more effectively on our end. When submitting, please select "Developer Platform" as the category and "Windows Copilot Runtime" as the sub-category. Follow these steps: 1. Open Feedback Hub using [Windows key]+[F] 2. Make sure you're signed in 3. When entering your bug details, please start your title with "[WCR APIs]" 4. Choose "Developer Platform" as the category and "Windows Copilot Runtime" as the sub-category 5. Under "Add more details", select "Recreate my problem" 6. Start the recording, show us the issue with your app or sample, then stop recording 7. Include as many details as you can about how to reproduce the issue 8. Submit your feedback Thanks for helping us improve!
thanks @connorMicrosoft -- i've done this as well. feedback link https://aka.ms/AAw9gm8
@connorMicrosoft , can you please follow-up on this.
@jonathankhootek @alejandro5042 are you still experiencing this issue? So far we're only seeing it on your devices it seems. A Windows update might fix it - let me know.
@connorMicrosoft i am, unfortunately. i'm attaching the test code i'm using, maybe there is something i'm doing wrong? (ignore the packaging project)
this is my machine's update history -- i'm up-to-date as far as i can tell.
Processor Snapdragon(R) X 12-core X1E80100 @ 3.40 GHz (3.42 GHz) Installed RAM 32.0 GB (31.6 GB usable) System type 64-bit operating system, ARM-based processor
Yes, I still am getting this error:
I'm now on Windows 26120.4161.
Sorry I missed the Feedback Hub stuff (I was traveling). Just submitted a feedback item!
Also, I have some colleagues that also failed to run PhiSilica on their ARM-based laptops. I suspect it's not just us.
I just updated my code to 1.8.250515001-experimental2, just in case the latest library fixed it. Also had to update Win App SDK to: 1.8 Experimental2 (1.8.250515001-experimental2).
Still get the error, now just earlier in my code:
BTW, I tried on 1.7.250513003 and GenerateResponseAsync is missing??
@alejandro5042 1.7 and 1.8 are drastically different in how they work :\ (but both fail for me)
And do the apps you're building have identity? We call this out on several pages in the docs: Near the top of the overview topics for each feature:
- https://learn.microsoft.com/en-us/windows/ai/apis/phi-silica
- https://learn.microsoft.com/en-us/windows/ai/apis/text-recognition
- https://learn.microsoft.com/en-us/windows/ai/apis/imaging
- https://learn.microsoft.com/en-us/windows/ai/apis/content-moderation
And there's a brief note on https://learn.microsoft.com/en-us/windows/ai/apis/troubleshooting
@connorMicrosoft in my case this is a WPF application so should fall under the Win32 section, as far as i can tell? (again, it works fine for me in WinUI3 apps, just not WPF)
https://learn.microsoft.com/en-us/windows/apps/package-and-deploy/#win32-and-net-desktop-apps
we can give it an identity during packaging (though that also seemed to not help in my case -- the packaging project i used is in the code i linked above), but that means we cannot debug the application? (perhaps i'm completely misunderstanding how to implement this?)
update! this blog post runs you through specific WPF packaging steps which i must have messed up; things are looking up! (i got the sample to work with some tweaks) https://blog.revolution.com.br/2025/05/04/adding-ai-in-your-wpf-app/
There's other simple samples in https://github.com/microsoft/WindowsAppSDK-Samples/tree/release/experimental/Samples/WindowsAIFoundry targeting the latest 1.8 experimental that has the updated (pretty close to final) API shape and behavior.
There are some things you need to add to the app manifest, which may resolve this issue. See steps 3 and 4 https://learn.microsoft.com/en-us/windows/ai/apis/get-started?tabs=winget%2Cwinui%2Cwinui2