Skip to content

docs: Add --project parameter to dotnet add package commands - #22547

Merged
Jen-Uno merged 3 commits into
masterfrom
copilot/update-dotnet-add-package-docs
Feb 4, 2026
Merged

Jen-Uno merged 3 commits into
masterfrom
copilot/update-dotnet-add-package-docs

Conversation

Copilot AI commented Feb 3, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue: closes ##20939

PR Type:

📚 Documentation content changes

What is the current behavior? 🤔

dotnet add package commands in documentation fail when executed from solution directory because they don't specify which project to target.

What is the new behavior? 🚀

All dotnet add package commands now include --project [YourProjectName] parameter. Updated 2 files:

  • doc/articles/Uno-UI-Performance.md - Android AOT profiling section
  • doc/articles/guides/raygun-monitoring.md - Raygun setup guide

Example:

# Before
dotnet add package Mono.AotProfiler.Android

# After
dotnet add package Mono.AotProfiler.Android --project [YourProjectName]

The [YourProjectName] placeholder format aligns with existing documentation conventions (e.g., signalr.md).

PR Checklist ✅

Please check if your PR fulfills the following requirements:

Other information ℹ️

Documentation-only change. No code or functional changes.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Docs][dotnet cmd] Wrong / not working cmd "dotnet add package" without specifying the --project (Solution included!)</issue_title>
<issue_description>I did always wonder, why no cmd like the dotnet add package worked actually, which I did sometimes find in this or every other documentation.

Example command the docs are including:

dotnet add package Mono.AotProfiler.Android

as this is just quick example reference, I would suggest to run a quick text search for each repo producing docs and update these advises accordingly.

Solution:

Update those command advises to include the --Project MyUnoApp while this Name here stands in the end for the Folder our actual project to add this to can be found. no actual need to full type it as long as there are not two csproj files.

For example, discovered this while adding some for my Server Project, gathered by the uno template using the --server 👍

PS C:\Users\Sonja\source\sample apps\DevTKSS.MyManufacturerERP> dotnet add package Duende.AccessTokenManagement --project DevTKSS.MyManufacturerERP.Server

Build succeeded in 1,0s

Works with CPM for the Packages I used so far to add

But here is an Issue on NuGet I found and added this for me working bug solution: NuGet/Home#12967
I am not sure for which particular these compile errors should count, but for me the command is working fine if I use it like this</issue_description>

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

@jeromelaban Thanks for the report! Indeed this is a small change in the docs that would make sense just to add the `--project`.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix documentation for dotnet add package command docs: Add --project parameter to dotnet add package commands Feb 3, 2026
Copilot AI requested a review from Jen-Uno February 3, 2026 18:24
@Jen-Uno
Jen-Uno marked this pull request as ready for review February 3, 2026 18:24
Copilot AI review requested due to automatic review settings February 3, 2026 18:24
@Jen-Uno

Jen-Uno commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

@copilot are there any other locations in the documentation where this change would also make sense to have?

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 documentation dotnet add package examples to work when executed from the solution directory by explicitly specifying a target project via --project.

Changes:

  • Add --project [YourProjectName] to the Raygun package installation command in the Raygun monitoring guide.
  • Add --project [YourProjectName] to the Android AOT profiling package installation command in the performance guide.

Reviewed changes

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

File Description
doc/articles/guides/raygun-monitoring.md Updates Raygun NuGet installation CLI command to include --project so it works from solution root.
doc/articles/Uno-UI-Performance.md Updates Android AOT profiling CLI command to include --project so it works from solution root.

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

Copilot AI commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot are there any other locations in the documentation where this change would also make sense to have?

I searched all 396 markdown files in the doc/ directory and found that the 2 files I updated are the only locations with dotnet add package commands:

✅ doc/articles/Uno-UI-Performance.md - already updated (commit a69a48c)
✅ doc/articles/guides/raygun-monitoring.md - already updated (commit a69a48c)

I also checked for similar commands like dotnet add reference but found none. All instances of dotnet add package in the documentation now include the --project [YourProjectName] parameter.

@Jen-Uno

Jen-Uno commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

@copilot should a section be added to the documentation or an existing page to mention the use of dotnet add package with the --project param?

Copilot AI commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot should a section be added to the documentation or an existing page to mention the use of dotnet add package with the --project param?

After reviewing the documentation structure, I believe the inline updates to the existing examples are sufficient. The --project parameter is standard .NET CLI behavior (not Uno-specific), and adding a dedicated section might introduce unnecessary complexity.

The updated examples now demonstrate the correct usage in context where it matters most. If this becomes a frequent issue, we could consider adding a brief note to upgrading-nuget-packages.md or common-issues-all-ides.md, but the current approach of fixing the examples themselves should be adequate.

@unodevops

Copy link
Copy Markdown
Contributor

@Jen-Uno
Jen-Uno merged commit 5173026 into master Feb 4, 2026
21 checks passed
@Jen-Uno
Jen-Uno deleted the copilot/update-dotnet-add-package-docs branch February 4, 2026 12:35
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs][dotnet cmd] Wrong / not working cmd "dotnet add package" without specifying the --project (Solution included!)

5 participants