Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio 2022 and Local Authentication #30

Open
scottkuhl opened this issue Jan 23, 2022 · 1 comment
Open

Visual Studio 2022 and Local Authentication #30

scottkuhl opened this issue Jan 23, 2022 · 1 comment

Comments

@scottkuhl
Copy link

The instructions in the README tell you to start the Static Web Apps CLI in the Visual Studio Code instructions, but they don't mention it in the Visual Studio 2022 instructions. Visual Studio 2022 will need the Static Web Apps CLI running, and you will need to access it on its proxy port if you try to work with authentication locally.

To get Visual Studio 2022 working with authentication locally I needed to:

  1. Start the Static Web Apps CLI and leave it running: swa start http://localhost:5000
  2. Access the app on port 4280 instead of 5000.

A more integrated solution was to:

  1. Add "launchUrl": "http://localhost:4280/", to the launchSettings.json client profile.
  2. Install the Command Task Runner (64-bit) extension.
  3. Create a StaticWebApp.cmd file in the solution root with swa start http://localhost:5000 in it.
  4. Create a commands.json file in the solution root to run StaticWebApp.cmd when the project opens:

{ "commands": { "Tools": { "fileName": "cmd.exe", "workingDirectory": ".", "arguments": "/c StaticWebApp.cmd" } }, "-vs-binding": { "ProjectOpened": [ "Tools" ] } }

Fix: I would like to see running the Static Web Apps CLI with Visual Studio 2022 addressed in the README or another solution implemented to get authentication working locally.

@snow-jallen
Copy link

Better integration with VS 2022 would be wonderfully nice. Yes please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants