Skip to content

Conversation

Copy link

Copilot AI commented Aug 20, 2025

When building .NET 10.0.0-preview.6 and later in offline environments (such as sandboxed builds), users encounter SDK resolution failures that prevent prep-source-build.sh from executing successfully:

/build/dotnet-10.0.0-preview.6.25358.103/eng/init-detect-binaries.proj : error : Could not resolve SDK "Microsoft.Build.NoTargets"
/build/dotnet-10.0.0-preview.6.25358.103/eng/init-detect-binaries.proj : error : SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" returned null
/build/dotnet-10.0.0-preview.6.25358.103/eng/init-detect-binaries.proj : error MSB4236: The SDK 'Microsoft.Build.NoTargets' specified could not be found.

The root cause is that init-detect-binaries.proj requires the Microsoft.Build.NoTargets SDK to execute, but offline builds cannot download it from online NuGet feeds. While the binary detection tooling itself is configured to use offline restore sources via --with-packages, the project file needs to resolve its SDK dependencies before it can execute.

This PR provides comprehensive documentation to address the issue:

New Documentation

  • troubleshooting-offline-builds.md - Complete troubleshooting guide covering the problem, root cause, and practical workarounds
  • vmr-sdk-configuration-guidance.md - Technical implementation guidance for VMR developers to implement the permanent solution

Immediate Workarounds Documented

  1. NuGet Configuration Method: Add both the packages directory and SourceBuildReferencePackages subdirectory to NuGet.config
  2. Stage 2 Build Workaround: Use -p:SkipArcadeSdkImport=true when binary detection isn't critical
  3. Proper Offline Source Setup: Guidelines for configuring offline package sources correctly

Documentation Updates

  • Updated README.md to reference the new troubleshooting guide
  • Enhanced bootstrapping-guidelines.md and how-to-stage2-build.md with offline scenario guidance
  • All documentation follows repository markdown standards with proper cross-references

Implementation Roadmap

The documentation provides clear technical guidance for implementing the permanent solution in the VMR repository, which involves factoring SDK configuration logic from build.sh and init-source-only.proj to be shared with prep-source-build.sh for offline builds.

This ensures users have immediate solutions while providing a clear path for the VMR team to implement the complete fix.

Fixes #5286.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/dotnet/source-build/issues/5286
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Author

Copilot AI commented Aug 20, 2025

@MichaelSimons 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI changed the title [WIP] Microsoft.Build.NoTargets missing in prep-source-build on 10.0.0-preview.6 Add comprehensive documentation for offline build troubleshooting and Microsoft.Build.NoTargets SDK resolution Aug 20, 2025
Copilot AI requested a review from MichaelSimons August 20, 2025 14:08
Copilot finished work on behalf of MichaelSimons August 20, 2025 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants