-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/aspire initialization #99
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
95 commits
Select commit
Hold shift + click to select a range
95f52e7
fix: configurar caminhos Aspire para pacotes NuGet locais
60cbb06
fix: eliminar todos os warnings de NuGet
5bdc442
fix: corrigir detecção de SolutionRoot no Directory.Build.targets
e04dacb
fix: configurar variáveis de ambiente Aspire via código
895db26
fix: corrigir builds Linux CI e melhorar detecção de plataforma
725d78f
refactor: melhorar qualidade de código e confiabilidade dos scripts
cb57ca6
fix: corrigir end-of-line dos scripts PowerShell para LF
c00a388
fix: corrigir password mismatch e adicionar suporte DB_PASSWORD
c9e2d8e
fix: Corrigir seeding e DI para local development
69135f3
fix: Corrigir retorno de Effect methods no ProvidersEffects
dcc9645
feat: Adicionar scripts de permissões para todos os módulos
9421b58
chore: Remover backups .disabled dos módulos de database
ad21980
fix: Corrigir assinatura de HandleLoadAllowedCitiesAction
011f0e7
refactor: Aplicar correções de segurança e boas práticas
4e22195
refactor: Aplicar melhorias de revisão de código (parte 1)
e89ed27
fix: Consolidar migrations duplicadas de SearchProviders
2679b49
fix: Registrar ILocationsApi e IDocumentsApi no Admin Portal
6945a8c
refactor: Aplicar melhorias de revisão de código (parte 2)
a3b5ade
fix: Remover página Home.razor duplicada que conflitava com Dashboard
6146fdf
fix: Adicionar AuthenticationService.js ao index.html do Admin Portal
4d2d244
refactor: Remover reflection com BindingFlags.NonPublic em MigrationH…
ab38143
refactor: Eliminar uso de reflection em Builders e testes de arquitetura
6dd92e6
refactor: Aplicar melhorias finais de revisão de código
e25367d
refactor: Aplicar melhorias de revisão de código - parte 3
97c3dfe
ci: Adicionar cleanup de disco antes dos testes de integração
ddd8d77
fix: Suprimir warning PendingModelChangesWarning em Development
de42eea
refactor: Aplicar melhorias de code review - parte 4
72d679c
fix: Remover cleanup de SDKs .NET que estava causando falha nos testes
81b75fd
fix: Suprimir PendingModelChangesWarning corretamente no registro DI …
9fecb10
refactor: Aplicar melhorias de code review - parte 5
b6e0de0
fix: Corrigir URLs hardcoded no Blazor para usar service discovery do…
05c2402
fix: Configurar portas fixas para desenvolvimento (API 7001, Keycloak…
f205d4b
fix: Remover WithHttpsEndpoint duplicado (conflito com launchSettings…
fce280a
refactor: aplicar melhorias de code review (SQL guards, protected set…
9fc57cd
refactor(tests): implement on-demand module migrations in integration…
c7a0ae6
refactor(tests): implement on-demand module migrations in integration…
68f85d5
Merge branch 'fix/aspire-initialization' of https://github.com/frigin…
953aa3e
Merge branch 'fix/aspire-initialization' of https://github.com/frigin…
20d8ce3
Remove SearchProviders migrations to recreate cleanly
1f4ceda
Fix critical issues from code review
3c154fa
Apply non-critical code review improvements
2b3f093
Update technical-debt.md with complete optimization stats
84586a6
Remove unused legacy code and simplify reflection-based tests
b8eabd0
Apply final code review feedback
659fceb
Fix AuthConstants.Claims property names in PermissionArchitectureTests
7d3676f
Fix Blazor Admin Portal CORS and Keycloak integration
e9e2c6f
fix: corrige testes de IBGE fallback configurando módulos necessários
047a38e
refactor: aplica sugestões de code review
3113d2c
feat: Implementar tema Keycloak customizado e corrigir autenticação A…
e94b2b1
refactor: Melhorias de qualidade e correções de code review
7b5eacd
feat(web-admin): add FluentValidation with Brazilian business rules
8f727ab
feat(web-admin): implement secure configuration management
737da41
Ref: Web Admin Review Part 3/15 - Fix memory leak in App.razor
b04051b
Ref: Web Admin Review Pre-Part 4 - Security, Performance & Code Quali…
6c8064e
Ref: Web Admin Review Additional Fixes - Security, Configuration & Co…
834581b
Ref: Web Admin Review Part 4/15 - Comprehensive Authorization Impleme…
c23e4b1
Part 5/15 - Implement Content Security Policy (CSP)
57c35a5
Code review fixes: security, translations, and quality improvements
8f436e9
refactor: reorganizar estrutura de projetos removendo duplicações
337117e
fix: resolve compilation errors after namespace migration
fbf9cfb
fix: complete namespace migration in test files and remove obsolete t…
4c8b24b
fix: update test files to use correct PagedResult API and fix CreateP…
77ec10d
fix: continue test fixes for pagination API changes
7dfdcbe
fix: resolve remaining E2E and Integration test compilation errors
1970a77
fix: update architecture tests for new namespace structure
f2ee93c
fix: restore accidentally deleted test files with updated namespaces
93b7618
feat(blazor): implement comprehensive API resilience patterns with Polly
e8baa71
docs: add minor improvements roadmap and deployment guides
b98bac9
refactor(web-admin): enforce strict Flux pattern for Provider delete …
152a22c
refactor(web-admin): enforce strict Flux pattern for Documents operat…
1afa2da
refactor(web-admin): enforce strict Flux pattern for Categories opera…
399ee25
refactor(web-admin): enforce strict Flux pattern for Services operations
9ee405e
refactor(web-admin): enforce strict Flux pattern for AllowedCities op…
c1e3391
docs(architecture): add comprehensive Flux pattern implementation guide
9e5da3a
fix: resolve test build errors
3e49786
docs: add Sprint 7.7 and 7.8 to roadmap
0857cf0
refactor: eliminate magic strings with centralized constants
b3b4cc5
docs: add Sprint 7.9 (Magic Strings Elimination) to roadmap
3865985
feat: implement accessibility features (Part 10) - WCAG 2.1 AA compli…
da1d130
feat: implement global error boundaries (Part 11) - Complete error ha…
fa8a959
feat: implement performance optimizations (Part 12) - Virtualization,…
b6443c6
docs: add Sprints 7.10-7.12 to roadmap (Parts 10-12 complete)
c198d88
feat(sprint-7.13): implement standardized error handling with retry l…
2e97790
feat(sprint-7.14): implement complete localization (i18n)
980c729
docs: update roadmap with Sprint 7.13 and 7.14
9dabf00
docs: add Part 13 (Unit Tests) to roadmap as future improvement
b56d446
fix(e2e): correct UpdateProvider test to match simplified DTO
83ecc99
fix(blazor): wire ErrorBoundary recovery and fix NotAuthorized context
2b49155
fix(security): implement safe retry policy to prevent duplicate writes
f41b921
fix(resilience): eliminate double-retry stacking (9→3 attempts)
49e8014
docs(resilience): add comprehensive resilience architecture guide
01ae905
fix(memory): eliminate memory leaks in LocalizationService and Perfor…
e9761f0
refactor(localization): migrate from custom Dictionary to .resx/IStri…
98f12e2
feat(error-handling): standardize correlation ID strategy and add can…
b36abac
feat(design): apply brand color scheme to Admin Portal
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| # Problema Conhecido: Aspire com Pacotes NuGet Locais | ||
|
|
||
| ## Descrição do Problema | ||
|
|
||
| Ao executar `.\scripts\dev.ps1` ou `dotnet run` no AppHost, pode ocorrer o seguinte erro: | ||
|
|
||
| ```text | ||
| System.AggregateException: One or more errors occurred. | ||
| (Property CliPath: The path to the DCP executable used for Aspire orchestration is required.; | ||
| Property DashboardPath: The path to the Aspire Dashboard binaries is missing.) | ||
| ``` | ||
|
|
||
| ## Causa Raiz | ||
|
|
||
| Este é um bug conhecido no .NET Aspire 13.x quando os pacotes NuGet são armazenados em um diretório customizado (usando `globalPackagesFolder` no nuget.config). | ||
|
|
||
| - O MSBuild corretamente define as propriedades `AspireDashboardPath` e `DcpCliPath` | ||
| - Mas o código runtime do Aspire espera `DashboardPath` e `CliPath` (sem prefixo "Aspire"/"Dcp") | ||
| - Estas propriedades runtime são lidas das variáveis de ambiente `DOTNET_ASPIRE_DASHBOARD_PATH` e `DOTNET_DCP_CLI_PATH` | ||
| - Issue rastreada em: [dotnet/aspire#6789](https://github.com/dotnet/aspire/issues/6789) | ||
|
|
||
| ## Soluções Alternativas | ||
|
|
||
| ### ✅ Opção 1: Executar via VS Code (Recomendado) | ||
|
|
||
| 1. Abra o projeto no VS Code | ||
| 2. Pressione `F5` ou vá em **Run > Start Debugging** | ||
| 3. Selecione `.NET Aspire: MeAjudaAi.AppHost` como perfil de execução | ||
|
|
||
| O VS Code com C# Dev Kit configura corretamente os caminhos necessários. | ||
|
|
||
| ### ✅ Opção 2: Executar via Visual Studio 2022 | ||
|
|
||
| 1. Abra `MeAjudaAi.slnx` no Visual Studio | ||
| 2. Defina `MeAjudaAi.AppHost` como projeto de inicialização | ||
| 3. Pressione `F5` ou **Debug > Start Debugging** | ||
|
|
||
| ### ⚠️ Opção 3: Configuração Manual (Avançado) | ||
|
|
||
| Defina as variáveis de ambiente antes de executar. Os exemplos abaixo mostram os caminhos para diferentes plataformas: | ||
|
|
||
| **Windows (x64):** | ||
| ```powershell | ||
| $env:DOTNET_DCP_CLI_PATH = "C:\Code\MeAjudaAi\packages\aspire.hosting.orchestration.win-x64\13.1.0\tools\dcp.exe" | ||
| $env:DOTNET_ASPIRE_DASHBOARD_PATH = "C:\Code\MeAjudaAi\packages\aspire.dashboard.sdk.win-x64\13.1.0\tools" | ||
| $env:POSTGRES_PASSWORD = "postgres" | ||
|
|
||
| cd src\Aspire\MeAjudaAi.AppHost | ||
| dotnet run | ||
| ``` | ||
|
|
||
| **macOS (Apple Silicon / ARM64):** | ||
| ```bash | ||
| export DOTNET_DCP_CLI_PATH="/Users/user/Code/MeAjudaAi/packages/aspire.hosting.orchestration.osx-arm64/13.1.0/tools/dcp" | ||
| export DOTNET_ASPIRE_DASHBOARD_PATH="/Users/user/Code/MeAjudaAi/packages/aspire.dashboard.sdk.osx-arm64/13.1.0/tools" | ||
| export POSTGRES_PASSWORD="postgres" | ||
|
|
||
| cd src/Aspire/MeAjudaAi.AppHost | ||
| dotnet run | ||
| ``` | ||
|
|
||
| **macOS (Intel / x64):** | ||
| ```bash | ||
| export DOTNET_DCP_CLI_PATH="/Users/user/Code/MeAjudaAi/packages/aspire.hosting.orchestration.osx-x64/13.1.0/tools/dcp" | ||
| export DOTNET_ASPIRE_DASHBOARD_PATH="/Users/user/Code/MeAjudaAi/packages/aspire.dashboard.sdk.osx-x64/13.1.0/tools" | ||
| export POSTGRES_PASSWORD="postgres" | ||
|
|
||
| cd src/Aspire/MeAjudaAi.AppHost | ||
| dotnet run | ||
| ``` | ||
|
|
||
| **Linux (x64):** | ||
| ```bash | ||
| export DOTNET_DCP_CLI_PATH="/home/user/Code/MeAjudaAi/packages/aspire.hosting.orchestration.linux-x64/13.1.0/tools/dcp" | ||
| export DOTNET_ASPIRE_DASHBOARD_PATH="/home/user/Code/MeAjudaAi/packages/aspire.dashboard.sdk.linux-x64/13.1.0/tools" | ||
| export POSTGRES_PASSWORD="postgres" | ||
|
|
||
| cd src/Aspire/MeAjudaAi.AppHost | ||
| dotnet run | ||
| ``` | ||
|
|
||
| **Nota sobre Detecção de Plataforma**: O VS Code e Visual Studio detectam automaticamente a plataforma (Windows/macOS/Linux) e arquitetura (x64/ARM64) para selecionar os pacotes corretos. O AppHost também possui lógica runtime para detectar a plataforma e configurar os caminhos apropriados quando executado via `dotnet run`. Use `DOTNET_DCP_CLI_PATH` e `DOTNET_ASPIRE_DASHBOARD_PATH` (com prefixo DOTNET_) - estes mapeiam para as propriedades runtime `CliPath` e `DashboardPath` que o AppHost lê, diferentes das propriedades MSBuild `DcpCliPath` e `AspireDashboardPath`. | ||
|
|
||
| ## Status | ||
|
|
||
| - ✅ Workaround documentado | ||
| - ⏳ Aguardando correção upstream no .NET Aspire ou migração para pacotes globais | ||
| - 🔄 Funciona perfeitamente via VS Code/Visual Studio | ||
|
|
||
| ## Alternativa: Desabilitar globalPackagesFolder | ||
|
|
||
| Se necessário executar via CLI, você pode temporariamente desabilitar o `globalPackagesFolder` no `nuget.config`: | ||
|
|
||
| ```xml | ||
| <config> | ||
| <!-- <add key="globalPackagesFolder" value="packages" /> --> | ||
| <!-- <add key="repositoryPath" value="packages" /> --> | ||
| </config> | ||
| ``` | ||
|
|
||
| Depois, execute: | ||
| ```powershell | ||
| dotnet restore | ||
| .\scripts\dev.ps1 | ||
| ``` | ||
|
|
||
| **Atenção**: Isso fará o restore baixar os pacotes para `%USERPROFILE%\.nuget\packages` (~5GB). | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.