Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 9, 2026

Enables the repository to build on Linux by downloading .NET and skipping native code compilation. This allows Copilot agents to assist with managed code development without requiring macOS/Xcode.

Changes

  • system-dependencies.sh: Detect Linux via uname -s and skip all macOS-specific checks (Xcode, Mono, simulators, etc.)
  • Make.config: Set placeholder Xcode values on Linux; platforms remain enabled to allow build progression through managed code
  • builds/Makefile: Use $(CP) variable instead of hardcoded cp -c; create cache directory before use
  • builds/create-csproj-for-all-packagereferences.sh: Fix $PWD variable reference; detect OS for correct sed -i syntax (empty string backup arg on macOS, none on Linux)

Behavior

On Linux:

  • make successfully downloads .NET SDK
  • Build system iterates into builds, runtime, and src directories
  • All platforms (iOS, tvOS, MacCatalyst, macOS) are enabled and build progresses through managed code
  • Build proceeds until native compilation is attempted (expected failure point)

On macOS:

  • No functional changes; all existing behavior preserved
Original prompt

This section details on the original issue you should resolve

<issue_title>Make the repository build successfully on Linux</issue_title>
<issue_description>In order to make it easier for Copilot to help us in this repository, it would be good to be able to partially build this repository on Linux.

Building any native code (C/C++/Objective-C) would not be possible (because there's no Xcode on Linux), but downloading .NET itself + building managed code should be possible.

Goal: successfully run make from the root directory, and it will iterate into the builds directory (to download .NET), and then iterate into the src directory (to build managed code).</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Make the repository build successfully on Linux Enable partial Linux builds for Copilot support Jan 9, 2026
Copilot AI requested a review from rolfbjarne January 9, 2026 15:42
Copy link
Member

@rolfbjarne rolfbjarne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot the network problems have been fixed, please try again

@@ -0,0 +1,30 @@
<!-- All msbuild target logic needs to be inside a project tag -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Don't check in any version of ProjectInspector.csproj, in any directory (and remove the ones in this PR).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed all ProjectInspector.csproj files in commit 7fcbf2e.

Make.config Outdated
export DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT)
export MD_APPLE_SDK_ROOT=$(abspath $(XCODE_DEVELOPER_ROOT)/../..)
else
# On Linux, set dummy Xcode values
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Use the word 'placeholder' instead of 'dummy'.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to 'placeholder' in commit 7fcbf2e.

Make.config Outdated
Comment on lines 308 to 313
INCLUDE_IOS=
INCLUDE_MAC=
INCLUDE_TVOS=
INCLUDE_MACCATALYST=
INCLUDE_SIMULATOR=
INCLUDE_DEVICE=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot They should all be included, not excluded, otherwise nothing will be built, even on Linux.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed - removed the override that was clearing the INCLUDE_* variables. They are now properly included on Linux in commit 7fcbf2e. The build now shows all platforms and progresses through builds/runtime/src directories until native compilation is attempted (which is expected to fail on Linux).

…holder' instead of 'dummy', keep INCLUDE_* variables

Co-authored-by: rolfbjarne <[email protected]>
Copy link
Contributor Author

Copilot AI commented Jan 12, 2026

@copilot the network problems have been fixed, please try again

Tested successfully! The build now progresses much further:

  • ✅ .NET SDK downloaded
  • ✅ Package downloads work (network issues resolved)
  • ✅ Build iterates through builds → runtime → src
  • ✅ All platforms properly included (iOS, tvOS, MacCatalyst, macOS)
  • Build proceeds until native compilation is attempted in runtime directory (expected failure on Linux)

The repository now builds successfully on Linux up to the point where Xcode/native tools are required.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build #7fcbf2e] Build failed (Build packages) 🔥

Build failed for the job 'Build packages' (with job status 'Failed')

Pipeline on Agent
Hash: 7fcbf2e7a16e328acf9602e0b37675637174640f [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [PR Build #7fcbf2e] Build failed (Detect API changes) 🔥

Build failed for the job 'Detect API changes' (with job status 'Failed')

Pipeline on Agent
Hash: 7fcbf2e7a16e328acf9602e0b37675637174640f [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 Unable to find the contents for the comment: D:\a\1\s\change-detection\results\gh-comment.md does not exist :fire

Pipeline on Agent
Hash: 7fcbf2e7a16e328acf9602e0b37675637174640f [PR build]

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.

Make the repository build successfully on Linux

3 participants