Disable ASPIRE004 On A Per-Project Basis
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
Given the new (and most excellent) `.AddEFMigrations(...)` from the `Aspire.Hosting.EntityFrameworkCore` package, the `ASPIRE004` is incorrectly flagging references as they're 'non executable', but the `.AddEFMigrations` requires the use of `WithMigrationsProject<>` when the `DBContext` is not in the same project.
This means we have to reference a library, rather than an executable project - as per-the newer API surface.
I wouldn't want to disable `ASPIRE004` across the project, as it has a valid use (see my example below), but I do want to disable it on a per-`ProjectReference` basis.
Existing (closed) issue: https://github.com/microsoft/aspire/pull/5230
### Expected Behavior
Disable ASPIRE004 either in the referenced project or in the `ProjectReference` itself, through the use of another property - much like the `IsAspireProjectResource="false"` does.
### Steps To Reproduce
My current `AppHost.csproj`:
```xml
Exe
48568432-20e3-408d-9fb4-97a00b2c2d3d
$(NoWarn);CA1515
```
### Exceptions (if any)
_No response_
### Aspire doctor output
```bash
┌───────────────────────────────────────────────────
│ …\core-app on 🌱 kieron/transformation [✘!?✓] via v26.1.0 via v10.0.202
└─➜ aspire doctor
Aspire Environment Check
========================
.NET SDK
✅ .NET 10.0.300-preview.0.26177.108 installed (x64)
Container Runtime
✅ Docker v29.4.1: running (auto-detected (default)) ← active
Environment
✅ HTTPS development certificate is trusted
Summary: 3 passed, 0 warnings, 0 failed
```
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.