Closed LadyNaggaga closed 12 months ago
Hello @LadyNaggaga, i am facing the same issue, any fix please?
Trying to run the sample without any changes runs in Visual Studio, but not in Devcontainers / Codespaces using the .NET CLI.
Hello @LadyNaggaga, i am facing the same issue, any fix please?
@nabilbo I am so sorry you are facing this too. We are working on fixing the bicep files to make sure this doesn't happen. If you have Visual Studio can you please try it there? If not we are working on getting this fixed
When running / debugging locally, don't use devcontainers / Docker.
Set the following environment variables.
For convenience, you can copy this script to a file and save it (i.e. SetEnvVariables.ps1):
param (
[Parameter(Mandatory=$true)]
[string]$EnvFilePath
)
# Check if the provided .env file exists
if (Test-Path $EnvFilePath -PathType Leaf) {
# Read the .env file and set environment variables
Get-Content $EnvFilePath | ForEach-Object {
# Split the line into key and value pairs
$key, $value = $_ -split '=', 2
# Trim leading/trailing spaces and quotes from values
$key = $key.Trim()
$value = $value.Trim("`"")
# Set the environment variable at the system level
# Output the set environment variable for verification
Write-Output "Set environment variable: $key=$value"
}
Write-Output "Environment variables have been set at the system level."
} else {
Write-Output "The specified .env file '$EnvFilePath' was not found."
}
Then run as SetEnvVariables.ps1 -EnvFilePath "PATH-TO-ENV-FILE"
Open solution in Visual Studio
Set PrepareDocs
as startup project
Run the application
This issue is for a: (mark with an
x
)Minimal steps to reproduce
azd up
Attempt to run locally
Any log messages given by the failure
Expected/desired behavior
OS and Version?
Versions
Mention any other details that might be useful