codex - 💡(How to fix) Fix Codex app on Windows fails SDK/workload resolution for some .NET projects while the same solution builds successfully in Visual Studio [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#18110Fetched 2026-04-17 08:32:44
View on GitHub
Comments
0
Participants
1
Timeline
7
Reactions
0
Participants
Timeline (top)
labeled ×5cross-referenced ×1unlabeled ×1

Error Message

Observed error: This does not look like a code error. It looks like a Codex environment / SDK resolver / workload issue because the failure happens before actual code compilation.

  • Several other projects fail with the same SDK resolver error.
  • Other projects fail before compilation with the same SDK resolver error.

Root Cause

MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.SDK.WorkloadAutoImportPropsLocator" because directory "C:\Program Files\dotnet\sdk\9.0.308\Sdks\Microsoft.NET.SDK.WorkloadAutoImportPropsLocator\Sdk" does not exist.

RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

26.409.61251

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

A multi-project .NET solution builds and runs successfully in Visual Studio on the same machine.

Inside Codex App on Windows, dotnet build fails before compilation, during Restore / SDK resolution.

Observed error:

MSB4276: The default SDK resolver failed to resolve SDK "Microsoft.NET.SDK.WorkloadAutoImportPropsLocator" because directory "C:\Program Files\dotnet\sdk\9.0.308\Sdks\Microsoft.NET.SDK.WorkloadAutoImportPropsLocator\Sdk" does not exist.

This does not look like a code error. It looks like a Codex environment / SDK resolver / workload issue because the failure happens before actual code compilation.

What steps can reproduce the bug?

  1. Open Codex App on Windows.
  2. Open a local multi-project .NET solution.
  3. Ask Codex to build the solution or build specific projects with dotnet build.
  4. Codex runs the build command in its environment.
  5. The build fails during Restore / SDK resolution before actual compilation.

I also checked individual projects:

  • Some class library projects build successfully.
  • Several other projects fail with the same SDK resolver error.

The failure is reproducible in Codex App, but the same solution builds and runs successfully in Visual Studio on the same machine.

What is the expected behavior?

If the solution builds successfully in Visual Studio on the same machine, Codex App should either:

  1. build the same projects successfully, or
  2. clearly report that its own environment is missing required SDK/workload components,

without implying that the code itself is broken.

Codex should not fail on SDK/workload resolution for projects that build correctly in the local Visual Studio environment.

Additional information

Local environment details:

  • .NET SDK: 9.0.308
  • MSBuild: 17.14.28
  • Installed workloads visible in local dotnet --info: android, maui-windows, maccatalyst, ios
  • No files were modified during diagnosis

Additional notes:

  • Some projects build successfully in Codex.
  • Other projects fail before compilation with the same SDK resolver error.
  • This appears to be a Codex App environment issue rather than a project code issue.

extent analysis

TL;DR

The most likely fix is to ensure the Codex App environment has the required .NET SDK workloads installed, specifically the ones listed in the local dotnet --info output.

Guidance

  • Verify the installed workloads in the Codex App environment by running dotnet --info within the Codex App and comparing the output with the local environment.
  • Check if the missing SDK "Microsoft.NET.SDK.WorkloadAutoImportPropsLocator" is related to a specific workload that is installed in the local environment but not in the Codex App environment.
  • Consider installing the required workloads in the Codex App environment using the dotnet workload install command, if possible.
  • If the issue persists, try to isolate the problem by building individual projects in the Codex App environment to identify which specific projects are causing the failure.

Example

No code snippet is provided as it is not directly relevant to the issue, but an example of installing a workload using the dotnet workload install command could be: dotnet workload install android

Notes

The issue seems to be related to the Codex App environment not having the required .NET SDK workloads installed, which are present in the local environment. The fact that some projects build successfully in the Codex App environment while others fail suggests that the issue is specific to certain workloads.

Recommendation

Apply a workaround by installing the required workloads in the Codex App environment, as the issue appears to be related to a mismatch between the local environment and the Codex App environment.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex app on Windows fails SDK/workload resolution for some .NET projects while the same solution builds successfully in Visual Studio [1 participants]