Update .NET connect sample: rename script, pin packages to major versions#6
Merged
Merged
Conversation
Co-authored-by: seesharprun <5067401+seesharprun@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
seesharprun
March 18, 2026 18:33
View session
seesharprun
approved these changes
Mar 18, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the .NET passwordless connectivity sample to reference the correct entrypoint file (connect.cs) in both documentation and the runtime configuration error message.
Changes:
- Fix README commands to use
connect.csfordotnet user-secretsanddotnet run - Update the
COSMOS_ENDPOINTconfiguration error message to referenceconnect.cs - Adjust script package references (Cosmos version floating + add Newtonsoft.Json)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| dotnet/001-connect-passwordless/readme.md | Updates run/setup commands to reference connect.cs instead of Program.cs. |
| dotnet/001-connect-passwordless/connect.cs | Updates package directives and aligns the user-secrets guidance in the exception message. |
Comments suppressed due to low confidence (2)
dotnet/001-connect-passwordless/connect.cs:3
- Using a floating NuGet version (
Microsoft.Azure.Cosmos@3.*) makes this sample non-reproducible and can silently break over time as new 3.x releases ship. Consider pinning to a specific tested version (or at least a specific minor like3.47.*) to keep the instructions stable.
dotnet/001-connect-passwordless/connect.cs:4 Newtonsoft.Json@13.*is added but nothing in this file references Newtonsoft.Json types. If Cosmos SDK needs it, the dependency should flow transitively; otherwise this extra package increases restore time and introduces additional version drift—please remove it or add a brief comment explaining why it must be a direct dependency for this file-based app.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Updates the sole .NET sample (
001-connect-passwordless) to use a wildcard major-version pin forMicrosoft.Azure.Cosmos, add the missingNewtonsoft.Jsondependency, and rename the script fromProgram.cstoconnect.cs.Changes
Program.cs→connect.csMicrosoft.Azure.Cosmos@3.47.0→Microsoft.Azure.Cosmos@3.*Newtonsoft.Json@13.*(required for successful build)readme.mdshell commands to referenceconnect.cs