Repository navigation
Conversation
Support .NET file-based app paths throughout discovery, restore graph generation, analysis, reporting, and package updates. Add opt-in recursive discovery for loose shebang .cs file-based apps while preserving the fast project-only recursive path by default. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for analyzing and upgrading .NET file-based apps (.cs script files with #:package/#:property directives), including discovery, dependency graph generation via dotnet restore+dotnet build /t:GenerateRestoreGraphFile, mapping graph results back to the source .cs path, variable-backed package directive updates, and CI coverage on .NET SDK 10.0.300.
Changes:
- New
ProjectPathExtensionsand updated discovery/analysis services to accept.cspaths and recursively discover loose shebang FBAs (gated behind--include-file-based-apps/-fba), excluding.csfiles inside a.csprojcone. VariableTrackingServiceextended to parse#:propertydefinitions, resolve$(...)expressions in#:packagedirectives, and update version variables in-place while preserving variable references;DotNetPackageServiceshort-circuits FBA variable updates and runsdotnet restore <file>instead ofdotnet add package.- New tests, fixtures, README documentation, and a dedicated cross-platform CI job (
file-based-app) that requires SDK 10.0.300.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/DotNetOutdated.Core/ProjectPathExtensions.cs | New helpers IsCSharpFile/IsCSharpProjectFile/IsProjectFile/IsSolutionFile |
| src/DotNetOutdated.Core/Services/IProjectDiscoveryService.cs | Adds includeFileBasedApps parameter |
| src/DotNetOutdated.Core/Services/ProjectDiscoveryService.cs | Recursive FBA discovery with shebang and project-cone logic; accepts .cs direct paths |
| src/DotNetOutdated.Core/Services/DependencyGraphService.cs | New restore+build path for FBAs; differentiated error message |
| src/DotNetOutdated.Core/Services/ProjectAnalysisService.cs | Maps FBA graph results back to original .cs path/name |
| src/DotNetOutdated.Core/Services/DotNetPackageService.cs | Short-circuit for FBA variable directives; new RestoreProject helper |
| src/DotNetOutdated.Core/Services/VariableTrackingService.cs | Parses #:property/#:package; updates property + preserves variable refs; cache invalidation refactor |
| src/DotNetOutdated.Core/Resources/ValidationErrorMessages.{resx,Designer.cs} | Updated messages mention file-based apps |
| src/DotNetOutdated/Program.cs | Adds -fba option, passes through to discovery; uses GetShortFolderName() for upgrade |
| src/DotNetOutdated/ProjectExtensions.cs | Treats .cs as SDK-style project |
| src/DotNetOutdated/McpServer.cs | MCP descriptions/schema updated; handles includeFileBasedApps |
| README.md | Documents .cs paths, -fba, SDK 10.0.300 requirement, FAQ note |
| .github/workflows/test.yml | New file-based-app cross-platform job with SDK 10.0.300 |
| test/DotNetOutdated.Tests/* | New tests for discovery, graph generation, variable tracking, package updates, and E2E (gated on SDK 10.0.300) |
| test-projects/file-based-app{,-direct-package}/app.cs | Test fixtures for variable-backed and direct #:package directives |
Files not reviewed (1)
- src/DotNetOutdated.Core/Resources/ValidationErrorMessages.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
slang25
approved these changes
May 29, 2026
Member
|
Thanks for this @DamianEdwards |
Merged
slang25
added a commit
that referenced
this pull request
May 30, 2026
Minor release: adds .NET file-based app support (#752). Co-authored-by: Claude Opus 4.8 <[email protected]>
This was referenced Jun 14, 2026
This was referenced Jul 1, 2026
This was referenced Jul 15, 2026
slang25
added a commit
to GREsau/dotnet-outdated
that referenced
this pull request
Nov 8, 2026
Resolves conflicts with variable tracking (dotnet-outdated#714), the CPM --no-restore direct write (dotnet-outdated#713), file-based apps (dotnet-outdated#752/dotnet-outdated#755) and short TFM names (dotnet-outdated#750). AddPackage now takes the VersionRange through all of master's new paths; single-version paths use the range's lower bound for now (refined in follow-up commits). Restores the System.Text.Json using needed by master's tests and adapts DotNetPackageServiceTests to the new signature. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
.cspaths#:packagedirectives, including variable-backed versions through#:property--include-file-based-apps/-fbaValidation
dotnet test --configuration Releasedotnet test --configuration Release --framework net9.0 --filter "FullyQualifiedName~File_Based_App"dotnet run --configuration Release --framework net9.0 --project src\DotNetOutdated -- test-projects\file-based-app\app.cs --fail-on-updates.NET SDK 10.0.300file-based app jobs on Ubuntu, Windows, and macOS