feat: enhance .NET detection with F#, framework parsing, and expanded signals#60
Merged
digitarald merged 1 commit intomainfrom Mar 15, 2026
Merged
Conversation
… signals - Add F# language detection via .fsproj files - Add .NET framework detection by parsing project file contents (ASP.NET Core, Blazor, Entity Framework, MAUI, Xamarin, WPF, WinForms, xUnit, NUnit, MSTest, Console) - Expand .NET signal detection to include global.json and Directory.Build.props - Add packages.lock.json to PACKAGE_MANAGERS for NuGet lock file detection - Update instructions prompt to include .fsproj and global.json - Add 7 new tests covering all new detection paths Cherry-picked and improved from #2.
Contributor
There was a problem hiding this comment.
Pull request overview
Enhances the repo analysis and instruction-generation services to better recognize .NET repositories by adding F# detection, additional .NET “signal” files, NuGet lockfile detection, and framework inference from *.csproj/*.fsproj contents.
Changes:
- Extend .NET detection signals (
.fsproj,global.json,Directory.Build.props) and add NuGet lockfile (packages.lock.json) recognition. - Add framework detection by scanning and parsing
*.csproj/*.fsprojto infer common .NET frameworks (ASP.NET Core, xUnit, Console, etc.). - Update instruction-generation prompt to include
.fsproj/global.json, and add tests for the new detection behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/services/__tests__/analyzer.test.ts |
Adds new Vitest cases covering F#, global.json detection, csproj framework parsing, mixed-language repos, and NuGet lockfile detection. |
packages/core/src/services/instructions.ts |
Updates the instruction-generation prompt to include additional .NET/F# tech stack markers. |
packages/core/src/services/analyzer.ts |
Expands .NET signals, adds NuGet lock detection, and introduces deep project-file scanning to infer .NET frameworks. |
Comment on lines
+112
to
+113
| if (hasCsproj || (hasDotnet && !hasFsproj)) analysis.languages.push("C#"); | ||
| if (hasFsproj) analysis.languages.push("F#"); |
| async function detectDotnetFrameworks(repoPath: string): Promise<string[]> { | ||
| const projectFiles = await fg("**/*.{csproj,fsproj}", { | ||
| cwd: repoPath, | ||
| onlyFiles: true, |
| analysis.frameworks.push(...detectFrameworks(deps, files)); | ||
| } | ||
|
|
||
| if (hasDotnet) { |
Comment on lines
+313
to
+317
| it("detects both C# and F# in mixed repo", async () => { | ||
| const repoPath = await makeTmpDir(); | ||
| await fs.writeFile( | ||
| path.join(repoPath, "App.csproj"), | ||
| '<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><OutputType>Exe</OutputType></PropertyGroup></Project>' |
github-actions Bot
pushed a commit
that referenced
this pull request
Mar 15, 2026
- Add [Unreleased] section documenting features from PRs #55, #60, #53, #52: - instructions --dry-run flag - VS Code batch instructions and multi-root workspace support - Enhanced .NET/F# detection with framework parsing - Windows .bat/.cmd spawn EINVAL fix - ESM/CJS createRequire banner fix - Model default updated to claude-sonnet-4.6 - TUI key binding changes (R for readiness, N for nested area) - Terminology de-branding - Fix stale claude-sonnet-4.5 reference in [2.0.0] section Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Mar 15, 2026
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.
Cherry-picks and improves the valuable parts from #2 (which targets the old file structure and has merge conflicts).
What's new
F# language detection
.fsprojfiles and pushes"F#"toanalysis.languagesExpanded .NET signals
global.jsonandDirectory.Build.propsnow trigger .NET detection alongside.csproj/.sln/.slnxpackages.lock.jsonadded toPACKAGE_MANAGERSfor NuGet lock file detection.NET framework detection from project file contents
New
detectDotnetFrameworks()globs**/*.{csproj,fsproj}and parses XML content to identify:Sdk="Microsoft.NET.Sdk"+OutputType=ExeInstructions prompt
.fsproj,global.jsonTests added (7 new)
.fsprojglobal.json.csprojMicrosoft.NET.Test.Sdkfalse positive for MSTest)packages.lock.json→ nuget package managerImprovements over #2
packages/core/src/services/)Include="pkg"with closing quote) to avoid prefix false positivesMicrosoft.NET.Test.Sdkexcluded from MSTest detection (it's a shared test host)node_modules,bin,objdirectories.csproj/.fsprojglob for language detection (solution parsing already handles monorepos)Closes #2