Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation for using Orchard Core from a local NuGet packages #11284

Merged
merged 4 commits into from
Mar 5, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ nav:
- Getting started:
- Create a CMS Web application: docs/getting-started/README.md
- Configure Preview package source: docs/getting-started/preview-package-source.md
- Using local package source: docs/getting-started/local-package-source.md
- Recipes and Starter Themes: docs/getting-started/starter-recipes.md
- Code Generation Templates: docs/getting-started/templates/README.md
- Create a Theme: docs/getting-started/theme.md
Expand Down
34 changes: 34 additions & 0 deletions src/docs/getting-started/local-package-source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Using a local copy of Orchard Core source code as nuget packages

In this article, we are going to create our own local nuget feed from our copy of the Orchard Core source code and add a new package source pointing to the local packages.

## Create NuGet packages from your local source code.

For more information on dotnet pack see: <https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-pack>
* From the command line, go to the root folder of your fork/branch of the Orchard Core source code.
* Pack all of the NuGet packages to one output folder of your choice.
Example: `dotnet pack -c Release -o c:\OrchardCoreNuget`

## Publish to your NuGet feed
For this example, we are going to use the Local Feed method. For more information on this see: <https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds>
* Create a folder for your NuGet Feed. For this example we are using `\\{YourServer}\NuGetServer`
* Add the NuGet packages to your local feed.
Example: `nuget init c:\OrchardCoreNuget \\{YourServer}\NuGetServer`


## Update your project to use your NuGet feed

* Update your nuget.config file so it points to your local feed.
https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file#packagesources
```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="MyFeed" value="\\{YourServer}\NuGetServer" />
Copy link
Contributor

@Skrypt Skrypt Mar 1, 2022

Choose a reason for hiding this comment

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

        <add key="MyFeed" value="\\{YourServer}\NuGetServer" />
        <add key="NuGet" value="https://api.nuget.org/v3/index.json" />

The local feed should be set before the Nuget (Public) one so that it knows which one to retrieve from first (priority).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated in 34d5ddf

</packageSources>
<disabledPackageSources />
</configuration>
```
* Make sure all of your projects are referencing the OrchardCore version in your local feed.