Saturday, August 12, 2023

using NuGet package in Visual Studio project

after upload my project into GitHub, how to use NuGet package in my local project?

  1. VisualStudio.gitignore
  2. this is the updated stanadard .gitignore file to use my project..

  3. Restore packages with NuGet Package Restore
  4. NuGet Package Restore restores all of a project's dependencies that are listed in either a project file or a packages.config file. You can restore packages manually with nuget restore, dotnet restore, msbuild -t:restore, or through Visual Studio. The dotnet build and dotnet run commands automatically restore packages, and you can configure Visual Studio to restore packages automatically when it builds a project.

  5. Package consumption workflow
  6. Between nuget.org and private package galleries that your organization might establish, you can find tens of thousands of highly useful packages to use in your apps and services. But regardless of the source, consuming a package follows the same general workflow.

  7. Omitting NuGet packages in source control systems
  8. Developers typically omit NuGet packages from their source control repositories and rely instead on package restore to reinstall a project's dependencies before a build.

  9. 7.11 Git Tools - Submodules
  10. Submodules It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and using in multiple parent projects. A common issue arises in these scenarios: you want to be able to treat the two projects as separate yet still be able to use one from within the other.

No comments:

Post a Comment