Skip to content

fix: use dnceng public feeds for 1ES network isolation#5

Merged
jfversluis merged 5 commits into
mainfrom
fix/nuget-feeds
Mar 17, 2026
Merged

fix: use dnceng public feeds for 1ES network isolation#5
jfversluis merged 5 commits into
mainfrom
fix/nuget-feeds

Conversation

@jfversluis
Copy link
Copy Markdown
Member

Fixes workload install failure on 1ES network-isolated agents (Unable to load the service index for source https://api.nuget.org/v3/index.json).

Changes

NuGet.config

Switched from nuget.org to dnceng/public mirror feeds — the same pattern used by dotnet/maui, dotnet/aspire, and dotnet/android:

  • dotnet-public — mirrors all of nuget.org
  • dotnet-eng — build tooling
  • dotnet10 — .NET 10 preview packages

These feeds are:

  • ✅ Accessible from 1ES network-isolated agents (no external internet needed)
  • ✅ Public — no authentication required for outside contributors
  • ✅ No VPN needed

Build template

Added NuGetAuthenticate@1 before workload install on both macOS and Windows jobs (required for internal builds, harmless for public).

Switch NuGet.config from nuget.org to dnceng/public mirror feeds:
- dotnet-public: mirrors nuget.org, accessible from 1ES agents
- dotnet-eng: build tooling packages
- dotnet10: .NET 10 preview packages

This is the standard pattern used by dotnet/maui, dotnet/aspire, and
dotnet/android. The dnceng/public feeds require no authentication for
read access, work in 1ES network-isolated agents, and work for
outside contributors — no VPN or credentials needed.

Also add NuGetAuthenticate@1 before workload install in the Azure
DevOps build template for internal build feed access.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 17, 2026 12:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates NuGet restore/workload acquisition to work on 1ES network-isolated agents by switching from nuget.org to dnceng public mirror feeds and ensuring pipelines authenticate NuGet feeds before workload installation.

Changes:

  • Replace nuget.org with dnceng/public Azure Artifacts feeds in NuGet.config (dotnet-public, dotnet-eng, dotnet10).
  • Add NuGetAuthenticate@1 prior to dotnet workload install in both macOS and Windows jobs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
eng/pipelines/templates/build-test-pack.yml Adds NuGet feed authentication step before workload install for macOS and Windows jobs.
NuGet.config Switches package sources to dnceng public mirror feeds to support network-isolated agents.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread NuGet.config Outdated
jfversluis and others added 4 commits March 17, 2026 13:16
Some DevFlow dependencies (Websocket.Client, XenoAtom.Terminal.UI,
Platform.Maui.MacOS, Platform.Maui.Linux.Gtk4) aren't mirrored on
the dotnet-public feed. Add nuget.org as a fallback source.

dnceng feeds are listed first (preferred for 1ES agents), with
nuget.org as fallback for packages not available there.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Packages need to be mirrored to dotnet-public feed instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Updated packages:
- Microsoft.Extensions.* 10.0.3 → 10.0.5
- System.Text.Json 9.0.6 → 10.0.5
- Fizzler 1.3.0 → 1.3.1
- SkiaSharp 3.119.0 → 3.119.2
- Websocket.Client 5.1.2 → 5.3.0
- XenoAtom.Terminal.UI 1.1.1 → 1.7.1
- ModelContextProtocol 1.0.0 → 1.1.0
- Platform.Maui.MacOS.* 0.2.0-beta → 0.3.0
- Platform.Maui.Linux.Gtk4.* 0.5.1 → 0.6.0
- Microsoft.NET.Test.Sdk 17.14.1 → 18.3.0
- xunit.runner.visualstudio 3.1.4 → 3.1.5
- coverlet.collector 6.0.4 → 8.0.0
- Microsoft.SourceLink.GitHub 8.0.0 → 10.0.201

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jfversluis jfversluis merged commit 3f1449b into main Mar 17, 2026
3 checks passed
@jfversluis jfversluis deleted the fix/nuget-feeds branch March 17, 2026 14:08
Redth added a commit that referenced this pull request Mar 29, 2026
.NET MAUI defines platform-specific preprocessor constants (IOS, ANDROID,
MACCATALYST, WINDOWS) so apps can write #if conditional code. Since
Platform.Maui.Linux.Gtk4 targets plain net10.0, no such constants exist
for Linux GTK apps.

Add LINUX and LINUX_GTK to DefineConstants in the transitive .props file
so consuming projects can use:

  #if LINUX_GTK
      // Linux GTK-specific code
  #endif

This follows the same pattern as the official MAUI platform TFMs and
allows PlatformHelper-style classes to detect Linux at compile time.

Fixes #5

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rmarinho added a commit that referenced this pull request Apr 30, 2026
- Remove local --dry-run option; use GlobalOptions.DryRunOption (finding #1)
- Return exit code 0 for 'skipped' status on non-macOS (finding #2)
- Wrap install action in try-catch using E2206 error code (finding #3)
- Replace null-forgiving with null-conditional on license check (finding #4)
- Defensive copy Platforms list with .ToList() (finding #5)
- Clarify cancellation limitation comment (finding #6)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rmarinho added a commit that referenced this pull request Apr 30, 2026
- Remove local --dry-run option; use GlobalOptions.DryRunOption (finding #1)
- Return exit code 0 for 'skipped' status on non-macOS (finding #2)
- Wrap install action in try-catch using E2206 error code (finding #3)
- Replace null-forgiving with null-conditional on license check (finding #4)
- Defensive copy Platforms list with .ToList() (finding #5)
- Clarify cancellation limitation comment (finding #6)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rmarinho added a commit that referenced this pull request Apr 30, 2026
…all command (#196)

* Refactor AppleProvider to delegate to EnvironmentChecker and add install command

- Delegate CheckHealth() to Xamarin.MacDev.EnvironmentChecker.Check() instead
  of manually querying XcodeManager/CommandLineTools/RuntimeService separately
- Add Xcode license acceptance check (new E2205 error code)
- Add SDK Platforms health check showing discovered platform SDKs
- Upgrade CLT-missing severity from Warning to Error (blocks development)
- Add 'maui apple install' command wrapping AppleInstaller.Install() for
  one-command environment bootstrapping (consistent with 'maui android install')
- Add --platform and --dry-run options to the install command
- Register AppleInstallResult in JSON source generator context
- Update FakeAppleProvider with InstallEnvironmentAsync support

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR review feedback for apple install command

- Remove local --dry-run option; use GlobalOptions.DryRunOption (finding #1)
- Return exit code 0 for 'skipped' status on non-macOS (finding #2)
- Wrap install action in try-catch using E2206 error code (finding #3)
- Replace null-forgiving with null-conditional on license check (finding #4)
- Defensive copy Platforms list with .ToList() (finding #5)
- Clarify cancellation limitation comment (finding #6)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add unit tests for 'maui apple install' command

Tests cover:
- Command structure (install exists, --platform option, no local --dry-run)
- Option parsing (multiple --platform values)
- Handler invocation via FakeAppleProvider
- Platform filter passthrough
- Global --dry-run option propagation
- Exit code 0 for 'ok' and 'skipped' status
- Exit code 1 for 'failed' status

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address review feedback: fix docs, exit code, default platform

- Fix <returns> doc to describe AppleInstallResult (not 'environment check')
- Fix XcodeVersion doc comment to say 'version and build number' (not path)
- Return exit code 1 on non-macOS for consistent signaling
- Default --platform to iOS; add 'all' option to install all runtimes
- Add test for --platform all passing null filter to provider

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add Apple CLI smoke test script and update instructions

- Create eng/smoke-tests/apple-cli-smoke-test.sh with 7 automated checks:
  xcode list, runtime list, simulator list, start/stop simulator,
  install dry-run (default iOS), install dry-run (all platforms)
- Update copilot-instructions.md to run smoke tests after Apple provider
  changes or Xamarin.Apple.Tools.MaciOS version updates on macOS

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Update version

* Open Simulator UI automatically on 'maui apple simulator start'

- Add --no-open flag to suppress UI launch (for CI/headless usage)
- Add OpenSimulatorApp() to IAppleProvider interface
- Implement via 'open -a Simulator' in AppleProvider
- Default behavior: boot device + open Simulator.app window

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix Apple install tests on Windows: skip handler tests on non-macOS

The install command handler returns exit code 1 on non-macOS platforms
(by design). Skip the handler-invocation tests when not running on macOS
since they test provider interaction, not the platform guard.

Command structure tests (Exists, HasPlatformOption, ParsesPlatformOption,
ParsesPlatformDefault) remain cross-platform.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mattleibow added a commit that referenced this pull request May 12, 2026
Critical/High fixes:
- #1: Use namespace+class for unique hint names (prevents AddSource crash
  when two pages share the same simple class name)
- #2: CrossFileResolver uses FQN lookup + ambiguity detection for
  duplicate simple names across namespaces
- #3: CollectionView conditional rendering fixed — no more [[double brackets]],
  uses unified annotation list builder
- #4: Root ContentPage walks children directly, preventing SemanticProperties
  on root from swallowing the entire page
- #5: Visibility conditions on layout containers now propagate as
  condition group wrappers ('When [visible when X = true]:')
- #6: Property-element content (ContentPage.Content, ScrollView.Content)
  no longer dropped — unknown property elements are transparent by default,
  only known non-visual ones (Resources, Triggers, etc.) are suppressed
- #7: Shell routes stored in UiElement for Shell page markdown

Medium fixes:
- #8: Promoted containers (Border with Description) now walk children too,
  preserving actionable descendants like buttons
- #9: Unresolved user controls kept as placeholders (previously dropped),
  important for third-party controls with SemanticProperties
- #10: DataTrigger with IsVisible=False setter now correctly inverted
  to 'hidden when Property = Value' instead of 'visible when'
- #11: IsVisible=False elements skipped entirely — not reachable by screen
  readers, should not appear in accessibility-first index
- #12: Aggregate namespace validated as legal C# before emitting
- #13: Always use global:: for page references in aggregate, even for
  no-namespace pages
- #14: BindingRegex now requires whitespace after 'Binding' keyword,
  preventing false matches like {BindingSource}
- #15: CrossFileResolver uses in-progress set for cycle detection,
  preventing partial cache on indirect A→B→A cycles

Low fixes:
- #16: Dead emptyViewChildren code block removed
- #17: Removed unused TemplateVariants from dead CollectionView code

104 exact-match tests, all passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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