Ajustes de VSCode Confirmacion
This commit is contained in:
parent
6624459bb0
commit
81308c2f79
28
.vscode/launch.json
vendored
Normal file
28
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Launch phronCare API",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "build",
|
||||||
|
"program": "${workspaceFolder}/phronCare.API/bin/Debug/net8.0/phronCare.API.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}/phronCare.API",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"serverReadyAction": {
|
||||||
|
"action": "openExternally",
|
||||||
|
"pattern": "\\bNow listening on:\\s+(https?://\\S+)",
|
||||||
|
"uriFormat": "%s/swagger/index.html"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||||
|
"ASPNETCORE_CONFIGURATION": "appsettings.json"
|
||||||
|
},
|
||||||
|
"sourceFileMap": {
|
||||||
|
"/Views": "${workspaceFolder}/Views"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
16
.vscode/tasks.json
vendored
Normal file
16
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "build",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/phronCare/phronCare.API/phronCare.API.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
@ -16,6 +16,9 @@ using Services.Interfaces;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
// Asegúrate de que el archivo appsettings.json se cargue correctamente
|
||||||
|
builder.Configuration.SetBasePath(Directory.GetCurrentDirectory())
|
||||||
|
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
|
||||||
|
|
||||||
#region DbContext Identity Configuration
|
#region DbContext Identity Configuration
|
||||||
var configuration = builder.Configuration;
|
var configuration = builder.Configuration;
|
||||||
@ -69,6 +72,10 @@ builder.Services.AddAuthentication(options =>
|
|||||||
|
|
||||||
#region Email Configuration
|
#region Email Configuration
|
||||||
var emailConfig = configuration.GetSection("EmailConfiguration").Get<EmailConfiguration>();
|
var emailConfig = configuration.GetSection("EmailConfiguration").Get<EmailConfiguration>();
|
||||||
|
if (emailConfig == null)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("La configuración del correo electrónico no se encontró o es inválida.");
|
||||||
|
}
|
||||||
builder.Services.AddSingleton(emailConfig);
|
builder.Services.AddSingleton(emailConfig);
|
||||||
builder.Services.AddScoped<IEmailService, EmailService>();
|
builder.Services.AddScoped<IEmailService, EmailService>();
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -43,5 +43,10 @@
|
|||||||
<ProjectReference Include="..\Domain\Domain.csproj" />
|
<ProjectReference Include="..\Domain\Domain.csproj" />
|
||||||
<ProjectReference Include="..\Services\Services.csproj" />
|
<ProjectReference Include="..\Services\Services.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="appsettings.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user