npm ERR! EBUSY: resource busy or locked, rename when installing
This error means a process on your Windows machine still has a file handle on a file inside of
If you've launched your app in Visual Studio, the likely culprit still holding onto this file is
PerfWatson2.exe, which is part of the Visual Studio Experience Improvement Program.
To resolve this issue, either end this process in the Task Manager or disable this feature in Visual Studio.
This issue can occur if the
Publisher field in the
Packaging section of the
Package.appxmanifest does not match the expected Common Name (CN) on the app store. To fix this, copy the expected CN from the Microsoft Store under the
Packages tab for your latest app
Submission, leaving out the
CN=, and paste it into the
Publisher Common Name field when creating a new test certificate:
If this doesn't resolve the issue, try deleting any old self-signed certificates from the
Manage computer certificates section in the Windows
Control Panel, and
Create a new one.
This build error in Visual Studio can occur if a certificate was used for builds that is now deleted. To fix this, open
Package.appxmanifest and choose the
Packaging tab, then select
Choose certificate and
Create a new one:
Microsoft C++ exception: winrt::hresult_error exception is thrown when launching the app.
There are a few possible reasons for this, as it is a generic error that can be thrown at different times from the Windows App SDK runtime.
First, try running a sync to make sure project files are available to the project:
npx cap sync @ionic-enterprise/capacitor-windows.
If this doesn't work, it could indicate an incomplete installation that is missing the WebView2 runtime. To resolve the issue, review the Installation guide to make sure every step was followed, including installing the WebView2 runtime.
Try deleting the related folder in
~/.nuget/packages related to that package, and reinstall it. Also, restarting Visual Studio often helps.