Skip to content

Update .NET connect sample: rename script, pin packages to major versions#6

Merged
seesharprun merged 1 commit into
mainfrom
copilot/update-sample-script-name
Mar 18, 2026
Merged

Update .NET connect sample: rename script, pin packages to major versions#6
seesharprun merged 1 commit into
mainfrom
copilot/update-sample-script-name

Conversation

Copilot AI commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Updates the sole .NET sample (001-connect-passwordless) to use a wildcard major-version pin for Microsoft.Azure.Cosmos, add the missing Newtonsoft.Json dependency, and rename the script from Program.cs to connect.cs.

Changes

  • Renamed Program.csconnect.cs
  • Package updates in script header directives:
    • Microsoft.Azure.Cosmos@3.47.0Microsoft.Azure.Cosmos@3.*
    • Added Newtonsoft.Json@13.* (required for successful build)
  • Updated inline error message and readme.md shell commands to reference connect.cs
-#:package Microsoft.Azure.Cosmos@3.47.0
+#:package Microsoft.Azure.Cosmos@3.*
+#:package Newtonsoft.Json@13.*

Co-authored-by: seesharprun <5067401+seesharprun@users.noreply.github.com>
@seesharprun seesharprun marked this pull request as ready for review March 18, 2026 18:36
Copilot AI review requested due to automatic review settings March 18, 2026 18:36
@seesharprun seesharprun merged commit f64963c into main Mar 18, 2026
4 of 6 checks passed
@seesharprun seesharprun deleted the copilot/update-sample-script-name branch March 18, 2026 18:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.cs for dotnet user-secrets and dotnet run
  • Update the COSMOS_ENDPOINT configuration error message to reference connect.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 like 3.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.

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.

3 participants