Official agent skill

MSBuildLocator .NET Framework Loader

by microsoft in microsoft/MSBuildLocator

Explains how MSBuildLocator loads MSBuild assemblies and finds Visual Studio installs on the .NET Framework net46 target, for anyone editing or reviewing that code.

OfficialCustom licenceAuto-check passedDevelopment

Install MSBuildLocator .NET Framework Loader

skills CLI
$ npx skills add microsoft/MSBuildLocator --skill msbuild-loader-netframework -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/MSBuildLocator msbuild-loader-netframework --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/MSBuildLocator.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/msbuild-loader-netframework .claude/skills/msbuild-loader-netframework && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
msbuild-loader-netframework
GitHub stars
263
Token cost
~745 tokens
SKILL.md length
256 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
Custom licence

At a glance

Explains how MSBuildLocator loads MSBuild assemblies and finds Visual Studio installs on the .NET Framework net46 target, for anyone editing or reviewing that code.

  • Editing the net46 registration or loader code in MSBuildLocator
  • SKILL.md covers Assembly-resolution handler, Discovery sources (net46 only), What net46 does NOT do and Register-before-load contract
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Reviewing a change to Visual Studio discovery on .NET Framework

What it does

This is a code-level reference for the net46 branches in src/MSBuildLocator/MSBuildLocator.cs, the #if NET46 and non-NETCOREAPP paths. It describes the AssemblyResolve handler: a static ResolveEventHandler stored before subscription, a cache keyed by assembly full name because the event can fire repeatedly, a lock around every lookup since resolution is not thread-safe, and loading from each registered search path with Assembly.LoadFrom.

It also lists the two discovery sources available on net46: the developer command prompt, read from VSINSTALLDIR, VSCMD_VER and VisualStudioVersion, and the Visual Studio Setup COM API for VS 2017 and later instances with the MSBuild component. SDK discovery, AssemblyLoadContext and hostfxr belong to the .NET Core path, covered by a separate skill. Under the register-before-load rule, registration is refused once a strong-named Microsoft.Build assembly is loaded, and a method that references such types can trip it when JIT-compiled.

When your agent uses it

  • Editing the net46 registration or loader code in MSBuildLocator
  • Reviewing a change to Visual Studio discovery on .NET Framework
  • Diagnosing assembly-resolution problems on a .NET Framework host
  • Working out why registration fails after Microsoft.Build is already loaded

Example prompts

  • “Review this change to the AssemblyResolve handler for thread-safety on net46.”
  • “Explain why registration fails after Microsoft.Build types are loaded in the AppDomain.”
  • “Walk me through how a developer command prompt is detected when no Visual Studio setup instance is found.”

What it can do on your machine

Read from SKILL.md and the folder at commit ff0b900. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

MSBuildLocator .NET Framework Loader loads about 745 tokens when it runs. Until then it costs about 117 tokens; SKILL.md has 256 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~117
When it runs · the whole SKILL.md, loaded when a task matches
~745

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 256 words (~745 tokens).

“Scope: src/MSBuildLocator/MSBuildLocator.cs #if NET46 and Framework (#else of NETCOREAPP) branches. FEATURE_VISUALSTUDIOSETUP is defined only when TargetFramework == net46 in Microsoft.Build.Locator.csproj. For build/test and cross-cutting conventions, see AGENTS.md.”

— opening of SKILL.md by microsoft, Custom licence
name
msbuild-loader-netframework

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/msbuild-loader-netframework of microsoft/MSBuildLocator.

Open the folder on GitHubat commit ff0b900

Compare with similar skills

MSBuildLocator .NET Framework Loader next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

MSBuildLocator .NET Framework Loader compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
MSBuildLocator .NET Framework Loader this skillmicrosoft/MSBuildLocator263—~745Automated safety check: PassCustom licence
Dotnet Debuggingnovotnyllc/dotnet-artisan233—~2.1kAutomated safety check: PassMIT
Okojo Node Ink Debugakeit0/okojo160—~798Automated safety check: PassMIT
Nes Rom Debugjonathanpeppers/dotnes780—~1.5kAutomated safety check: PassMIT
Raven Debug Compilermarinasundstrom/raven108—~1.6kAutomated safety check: PassMIT
Development Workflowrunceel/ReactiveProperty944—~1.4kAutomated safety check: PassMIT

Similar skills

  • Dotnet Debugging

    novotnyllc/dotnet-artisan

    Debugs Windows and Linux/macOS applications (native, .NET/CLR, mixed-mode) with WinDbg MCP (crash dumps, !analyze, !syncblk, !dlk, !runaway, !dumpheap, !gcroot, BSOD), dotnet-dump, lldb with SOS…

    233 GitHub stars~2.1k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Debug Okojo.Node large-app failures through sandbox/OkojoInkProbe and sandbox/OkojoNodeDebugSandbox.

    160 GitHub stars~798 tokensUpdated 16 days ago
    DevelopmentAuto-check passed
  • Nes Rom Debug

    jonathanpeppers/dotnes

    Disassemble and debug NES ROM files (.nes) produced by the dotnes transpiler.

    780 GitHub stars~1.5k tokensUpdated 14 days ago
    DevelopmentAuto-check passed
  • Raven Debug Compiler

    marinasundstrom/raven

    Debug workflow for Raven compiler analysis and emission issues using rvn frontend tooling and the rvnc compiler driver.

    108 GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Development Workflow

    runceel/ReactiveProperty

    ReactiveProperty repository development policy. An agent skill from runceel/ReactiveProperty.

    944 GitHub stars~1.4k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Analyze Error

    DataDog/dd-trace-dotnet

    Official

    Error Stack Trace Analysis for dd-trace-dotnet. An agent skill from DataDog/dd-trace-dotnet.

    573 GitHub stars~634 tokensUpdated today
    DevelopmentAuto-check passed

More from microsoft/MSBuildLocator

  • MSBuildLocator .NET Core Loader

    microsoft/MSBuildLocator

    Official

    Reference for how MSBuildLocator loads MSBuild assemblies and finds the .NET SDK on .NET Core hosts, for anyone editing or debugging that loader code.

    263 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Code Review

    microsoft/MSBuildLocator

    Official

    Repository-specific checks for Microsoft.Build.Locator code reviews.

    263 GitHub stars~293 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about MSBuildLocator .NET Framework Loader

What does MSBuildLocator .NET Framework Loader do?

Explains how MSBuildLocator loads MSBuild assemblies and finds Visual Studio installs on the .NET Framework net46 target, for anyone editing or reviewing that code. cs, the #if NET46 and non-NETCOREAPP paths.LoadFrom.

When should I use MSBuildLocator .NET Framework Loader?

MSBuildLocator .NET Framework Loader fits situations like: editing the net46 registration or loader code in MSBuildLocator; reviewing a change to Visual Studio discovery on .NET Framework; diagnosing assembly-resolution problems on a .NET Framework host; working out why registration fails after Microsoft.Build is already loaded.

How do I install MSBuildLocator .NET Framework Loader in Claude Code?

Run `npx skills add microsoft/MSBuildLocator --skill msbuild-loader-netframework -a claude-code`. Or copy the skill folder (.agents/skills/msbuild-loader-netframework in microsoft/MSBuildLocator) into .claude/skills/msbuild-loader-netframework in your project. Claude Code loads it when a task matches its description.

How do I install MSBuildLocator .NET Framework Loader in Codex?

Run `npx skills add microsoft/MSBuildLocator --skill msbuild-loader-netframework -a codex`. Or copy the skill folder (.agents/skills/msbuild-loader-netframework in microsoft/MSBuildLocator) into .agents/skills/msbuild-loader-netframework in your project. Codex loads it when a task matches its description.

Can I use MSBuildLocator .NET Framework Loader in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/MSBuildLocator --skill msbuild-loader-netframework -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/msbuild-loader-netframework, .gemini/skills/msbuild-loader-netframework, .github/skills/msbuild-loader-netframework and .opencode/skills/msbuild-loader-netframework in your project.

What does MSBuildLocator .NET Framework Loader need to run?

SKILL.md names no scripts, command-line tools or credentials: MSBuildLocator .NET Framework Loader is instructions for the agent only.

Does MSBuildLocator .NET Framework Loader access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is MSBuildLocator .NET Framework Loader safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does MSBuildLocator .NET Framework Loader use?

MSBuildLocator .NET Framework Loader has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does MSBuildLocator .NET Framework Loader use?

About 745 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to MSBuildLocator .NET Framework Loader?

Skills that share tags, products or a category with MSBuildLocator .NET Framework Loader: Dotnet Debugging (novotnyllc/dotnet-artisan, 233 stars), Okojo Node Ink Debug (akeit0/okojo, 160 stars), Nes Rom Debug (jonathanpeppers/dotnes, 780 stars) and Raven Debug Compiler (marinasundstrom/raven, 108 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains MSBuildLocator .NET Framework Loader?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/MSBuildLocator, which has 263 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 6, 2026.

Source: microsoft/MSBuildLocator on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.