Codex app on Windows fails SDK/workload resolution for some .NET projects while the same solution builds successfully in Visual Studio
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?
- Open Codex App on Windows.
- Open a local multi-project .NET solution.
- Ask Codex to build the solution or build specific projects with
dotnet build. - Codex runs the build command in its environment.
- 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:
- build the same projects successfully, or
- 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.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗