Successfully logged into Azure! – Failed to setup project: EPERM: operation not permitted
Publish Azure Static Web Apps using Visual Studio Community 2022. This problem is new after the lastest upgrade of VS.
Authentification avec Static Web Apps... swa.cmd login --subscription-id 96fb6c8f-d34e-401b-919e-0a990e0f5100 --tenant-id d99bfd9c-0927-435b-9a7c-192aaf7a687e --app-name P-DELTA --resource-group P-DELTA_group --no-use-keychain Welcome to Azure Static Web Apps CLI (1.1.8) Checking Azure session... ✔ Successfully logged into Azure! ✖ Failed to setup project: EPERM: operation not permitted, open 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE.env' ✖ If you believe this behavior is unexpected, please raise a GitHub issue at: https://github.com/Azure/static-web-apps-cli/issues/new/choose Impossible de s’authentifier auprès de Static Web App 'P-DELTA'.
@mbouthillette please have you found a solution to this, i have the same error to
please have you found a solution to this, i have the same error to
Same error here.
@improwise just make use of the cli, it works (swa) command
Can you please provide the precise version of Visual Studio and the extension please?
Here is how I fixed this issue:
- Open an admin terminal
- Change directory to C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE
- Create an empty file called ".env" in that folder
- Change the permissions on that file to all all access to all users (or your specific user if preferred)
This .env file is used to persist your Azure subscription ID and tenant ID. It is not clear what other things it do, so it is possible this may introduce a security issue; perhaps someone from Microsoft could comment.
@payetools proposed solution did not work for me. Deployment still fails with a new error message "Failed to setup project: EISDIR: illegal operation on a directory, read"