Update VSCode Blazor

This commit is contained in:
Leandro Hernan Rojas 2025-01-29 00:48:14 -03:00
parent 81308c2f79
commit 15e9c8f42a
3 changed files with 103 additions and 39 deletions

61
.vscode/launch.json vendored
View File

@ -1,28 +1,41 @@
{ {
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
// Configuración existente de la API (no modificar)
{ {
"name": "Launch phronCare API", "name": "Launch phronCare API",
"type": "coreclr", "type": "coreclr",
"request": "launch", "request": "launch",
"preLaunchTask": "build", "preLaunchTask": "build",
"program": "${workspaceFolder}/phronCare.API/bin/Debug/net8.0/phronCare.API.dll", "program": "${workspaceFolder}/phronCare.API/bin/Debug/net8.0/phronCare.API.dll",
"args": [], "args": [],
"cwd": "${workspaceFolder}/phronCare.API", "cwd": "${workspaceFolder}/phronCare.API",
"stopAtEntry": false, "stopAtEntry": false,
"serverReadyAction": { "serverReadyAction": {
"action": "openExternally", "action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)", "pattern": "\\bNow listening on:\\s+(https?://\\S+)",
"uriFormat": "%s/swagger/index.html" "uriFormat": "%s/swagger/index.html"
}, },
"env": { "env": {
"ASPNETCORE_ENVIRONMENT": "Development", "ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_CONFIGURATION": "appsettings.json" "ASPNETCORE_CONFIGURATION": "appsettings.json"
}, },
"sourceFileMap": { "sourceFileMap": {
"/Views": "${workspaceFolder}/Views" "/Views": "${workspaceFolder}/Views"
} }
},
// Nueva configuración para Blazor WebAssembly
{
"name": "Launch Blazor WASM",
"type": "blazorwasm",
"request": "launch",
"preLaunchTask": "build-blazor",
"url": "http://localhost:5165",
"browser": "default",
"cwd": "${workspaceFolder}/phronCare.UIBlazor",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
} }
] ]
} }

76
.vscode/tasks.json vendored
View File

@ -1,16 +1,66 @@
{ {
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
// Tarea existente de la API (no la modificamos)
{ {
"label": "build", "label": "build",
"command": "dotnet", "command": "dotnet",
"type": "process", "type": "process",
"args": [ "args": [
"build", "build",
"${workspaceFolder}/phronCare/phronCare.API/phronCare.API.csproj" "${workspaceFolder}/phronCare.API/phronCare.API.csproj"
], ],
"problemMatcher": "$msCompile" "problemMatcher": "$msCompile"
},
// Tareas nuevas para Blazor
{
"label": "build-blazor",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/phronCare.Blazor/phronCare.Blazor.csproj"
],
"problemMatcher": "$msCompile"
},
{
"label": "run-blazor",
"command": "dotnet",
"type": "process",
"args": [
"run",
"--project",
"${workspaceFolder}/phronCare.Blazor/phronCare.Blazor.csproj"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch-blazor",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/phronCare.Blazor/phronCare.Blazor.csproj"
],
"problemMatcher": "$msCompile",
"isBackground": true
} }
] ]
} }
// {
// "version": "2.0.0",
// "tasks": [
// {
// "label": "build",
// "command": "dotnet",
// "type": "process",
// "args": [
// "build",
// "${workspaceFolder}/phronCare.API/phronCare.API.csproj"
// ],
// "problemMatcher": "$msCompile"
// }
// ]
// }

View File

@ -1,8 +1,9 @@
{ {
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Information", "Default": "Warning",
"Microsoft.AspNetCore": "Warning" "Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
} }
}, },
"AllowedHosts": "*", "AllowedHosts": "*",