Fix devcontainer for private NuGet feed authentication and .NET 9.0 support#776
Closed
Fix devcontainer for private NuGet feed authentication and .NET 9.0 support#776
Conversation
Contributor
Author
|
@BenjaminMichaelis Unfortunately, I hit an error while trying to use the custom Copilot setup steps configured for this repository and had to close this PR. The error I am seeing is: Once you or someone with the necessary access fixes the problem, please unassign and then reassign issue #0 to me and I'll retry. Thanks! |
Copilot
AI
changed the title
[WIP] Fix devcontainer to be able to properly restore project. Reference @IntelliTect/EssentialCSharp.Web/files/.github/workflows/Build-Test-And-Deploy.yml as needed, make sure to implement private nuget feed authentication for our private nuget feed.
Fix devcontainer for private NuGet feed authentication and .NET 9.0 support
Sep 10, 2025
…upport Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
…back Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
43b94c5 to
cafee7f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The existing devcontainer configuration had two critical issues preventing proper project setup:
global.jsonEssentialCSharp.Shared.ModelsandContentFeedNugetpackagesThis resulted in developers being unable to restore packages or build the project within the devcontainer.
Solution
1. Updated DevContainer Configuration
Modified
.devcontainer/devcontainer.jsonto:global.jsonAZURE_DEVOPS_PATenvironment variable for private feed authentication2. Created Intelligent Setup Script
The new
.devcontainer/setup.shprovides:3. Enhanced Documentation
Updated
README.mdwith:Key Features
For developers with private feed access:
For developers without private feed access:
# Simply open in devcontainer -> automatic fallback to public packagesRobust error handling:
AccessToNugetFeed=falsewhen private feed is unavailableTesting
✅ Package restore works without private feed access
✅ Build and tests pass with .NET 9.0.101
✅ Authentication flow works with valid PAT tokens
✅ Graceful fallback when authentication fails
✅ Script is idempotent and handles re-runs correctly
The devcontainer now mirrors the GitHub Actions workflow authentication approach, ensuring consistent behavior between CI/CD and local development environments.
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:
api.hcaptcha.com/home/REDACTED/.dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Release/net9.0/EssentialCSharp.Web.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Release/net9.0/EssentialCSharp.Web.Tests.deps.json /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Release/net9.0/testhost.dll --port 46133 --endpoint 127.0.0.1:046133 --role client --parentprocessid 4053 --telemetryoptedin false(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.