Skip to content

Commit dd3e9e2

Browse files
authored
Merge pull request #4945 from marcduiker/remove-dotnet-submodule
Move .NET SDK docs & pluggable components into main docs
2 parents 9849a6b + 65b9cb7 commit dd3e9e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+6401
-11
lines changed

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
[submodule "sdkdocs/php"]
55
path = sdkdocs/php
66
url = https://github.com/dapr/php-sdk.git
7-
[submodule "sdkdocs/dotnet"]
8-
path = sdkdocs/dotnet
9-
url = https://github.com/dapr/dotnet-sdk.git
107
[submodule "translations/docs-zh"]
118
path = translations/docs-zh
129
url = https://github.com/dapr/docs-zh.git
@@ -20,9 +17,6 @@
2017
[submodule "sdkdocs/js"]
2118
path = sdkdocs/js
2219
url = https://github.com/dapr/js-sdk.git
23-
[submodule "sdkdocs/pluggable-components/dotnet"]
24-
path = sdkdocs/pluggable-components/dotnet
25-
url = https://github.com/dapr-sandbox/components-dotnet-sdk
2620
[submodule "sdkdocs/pluggable-components/go"]
2721
path = sdkdocs/pluggable-components/go
2822
url = https://github.com/dapr-sandbox/components-go-sdk

hugo.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,10 @@ module:
284284
- source: sdkdocs/php/daprdocs/content/en/php-sdk-docs
285285
target: content/developing-applications/sdks/php
286286
lang: en
287-
- source: sdkdocs/dotnet/daprdocs/content/en/dotnet-sdk-docs
287+
- source: sdkdocs/dotnet/content/en/dotnet-sdk-docs
288288
target: content/developing-applications/sdks/dotnet
289289
lang: en
290-
- source: sdkdocs/dotnet/daprdocs/content/en/dotnet-sdk-contributing
290+
- source: sdkdocs/dotnet/content/en/dotnet-sdk-contributing
291291
target: content/contributing/sdk-contrib/
292292
lang: en
293293
- source: sdkdocs/go/daprdocs/content/en/go-sdk-docs
@@ -314,7 +314,7 @@ module:
314314
- source: sdkdocs/rust/daprdocs/content/en/rust-sdk-contributing
315315
target: content/contributing/sdk-contrib/
316316
lang: en
317-
- source: sdkdocs/pluggable-components/dotnet/daprdocs/content/en/dotnet-sdk-docs
317+
- source: sdkdocs/pluggable-components/dotnet/content/en/dotnet-sdk-docs
318318
target: content/developing-applications/develop-components/pluggable-components/pluggable-components-sdks/pluggable-components-dotnet
319319
lang: en
320320
- source: sdkdocs/pluggable-components/go/daprdocs/content/en/go-sdk-docs

sdkdocs/dotnet

Lines changed: 0 additions & 1 deletion
This file was deleted.

sdkdocs/dotnet/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Dapr .NET SDK documentation
2+
3+
This page covers how the documentation is structured for the Dapr .NET SDK.
4+
5+
## Dapr Docs
6+
7+
All Dapr documentation is hosted at [docs.dapr.io](https://docs.dapr.io), including the docs for the [.NET SDK](https://docs.dapr.io/developing-applications/sdks/dotnet/). Head over there if you want to read the docs.
8+
9+
### .NET SDK docs source
10+
11+
Although the docs site code and content is in the [docs repo](https://github.com/dapr/docs), the .NET SDK content and images are within the `content` and `static` directories, respectively.
12+
13+
This allows separation of roles and expertise between maintainers, and makes it easy to find the docs files you are looking for.
14+
15+
## Writing .NET SDK docs
16+
17+
To get up and running to write .NET SDK docs, visit the [docs repo](https://github.com/dapr/docs) to initialize your environment. It will clone both the docs repo and this repo, so you can make changes and see it rendered within the site instantly, as well as commit and PR into this repo.
18+
19+
Make sure to read the [docs contributing guide](https://docs.dapr.io/contributing/contributing-docs/) for information on style/semantics/etc.
20+
21+
## Docs architecture
22+
23+
The docs site is built on [Hugo](https://gohugo.io), which lives in the docs repo. This repo is setup as a git submodule so that when the repo is cloned and initialized, the dotnet-sdk repo, along with the docs, are cloned as well.
24+
25+
Then, in the Hugo configuration file, the `daprdocs/content` and `daprdocs/static` directories are redirected to the `daprdocs/developing-applications/sdks/dotnet` and `static/dotnet` directories, respectively. Thus, all the content within this repo is folded into the main docs site.
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
type: docs
3+
title: "Contributing to the .NET SDK"
4+
linkTitle: ".NET SDK"
5+
weight: 3000
6+
description: Guidelines for contributing to the Dapr .NET SDK
7+
---
8+
9+
# Welcome!
10+
If you're reading this, you're likely interested in contributing to Dapr and/or the Dapr .NET SDK. Welcome to the project
11+
and thank you for your interest in contributing!
12+
13+
Please review the documentation, familiarize yourself with what Dapr is and what it's seeking to accomplish and reach
14+
out on [Discord](https://bit.ly/dapr-discord). Let us know how you'd like to contribute and we'd be happy to chime in
15+
with ideas and suggestions.
16+
17+
There are many ways to contribute to Dapr:
18+
- Submit bug reports for the [Dapr runtime](https://github.com/dapr/dapr/issues/new/choose) or the [Dapr .NET SDK](https://github.com/dapr/dotnet-sdk/issues/new/choose)
19+
- Propose new [runtime capabilities](https://github.com/dapr/proposals/issues/new/choose) or [SDK functionality](https://github.com/dapr/dotnet-sdk/issues/new/choose)
20+
- Improve the documentation in either the [larger Dapr project](https://github.com/dapr/docs) or the [Dapr .NET SDK specifically](https://github.com/dapr/dotnet-sdk/tree/master/daprdocs)
21+
- Add new or improve existing [components](https://github.com/dapr/components-contrib/) that implement the various building blocks
22+
- Augment the [.NET pluggable component SDK capabilities](https://github.com/dapr-sandbox/components-dotnet-sdk)
23+
- Improve the Dapr .NET SDK code base and/or fix a bug (detailed below)
24+
25+
If you're new to the code base, please feel encouraged to ask in the #dotnet-sdk channel in Discord about how
26+
to implement changes or generally ask questions. You are not required to seek permission to work on anything, but do
27+
note that if an issue is assigned to someone, it's an indication that someone might have already started work on it.
28+
Especially if it's been a while since the last activity on that issue, please feel free to reach out and see if it's
29+
still something they're interested in pursuing or whether you can take over, and open a pull request with your
30+
implementation.
31+
32+
If you'd like to assign yourself to an issue, respond to the conversation with "/assign" and the bot will assign you
33+
to it.
34+
35+
We have labeled some issues as `good-first-issue` or `help wanted` indicating that these are likely to be small,
36+
self-contained changes.
37+
38+
If you're not certain about your implementation, please create it as a draft pull request and solicit feedback
39+
from the [.NET maintainers](https://github.com/orgs/dapr/teams/maintainers-dotnet-sdk) by tagging
40+
`@dapr/maintainers-dotnet-sdk` and providing some context about what you need assistance with.
41+
42+
# Contribution Rules and Best Practices
43+
44+
When contributing to the [.NET SDK](https://github.com/dapr/dotnet-sdk) the following rules and best-practices should
45+
be followed.
46+
47+
## Pull Requests
48+
Pull requests that contain only formatting changes are generally discouraged. Pull requests should instead seek to
49+
fix a bug, add new functionality, or improve on existing capabilities.
50+
51+
Do aim to minimize the contents of your pull request to span only a single issue. Broad PRs that touch on a lot of files
52+
are not likely to be reviewed or accepted in a short timeframe. Accommodating many different issues in a single PR makes
53+
it hard to determine whether your code fully addresses the underlying issue(s) or not and complicates the code review.
54+
55+
## Tests
56+
All pull requests should include unit and/or integration tests that reflect the nature of what was added or changed
57+
so it's clear that the functionality works as intended. Avoid using auto-generated tests that duplicate testing the
58+
same functionality several times. Rather, seek to improve code coverage by validating each possible path of your
59+
changes so future contributors can more easily navigate the contours of your logic and more readily identify limitations.
60+
61+
## Examples
62+
63+
The `examples` directory contains code samples for users to run to try out specific functionality of the various
64+
Dapr .NET SDK packages and extensions. When writing new and updated samples keep in mind:
65+
66+
- All examples should be runnable on Windows, Linux, and MacOS. While .NET Core code is consistent among operating
67+
systems, any pre/post example commands should provide options through
68+
[tabpane]({{% ref "contributing-docs.md#tabbed-content" %}})
69+
- Contain steps to download/install any required pre-requisites. Someone coming in with a fresh OS install should be
70+
able to start on the example and complete it without an error. Links to external download pages are fine.
71+
72+
## Documentation
73+
74+
The `daprdocs` directory contains the markdown files that are rendered into the [Dapr Docs](https://docs.dapr.io) website. When the
75+
documentation website is built this repo is cloned and configured so that its contents are rendered with the docs
76+
content. When writing docs keep in mind:
77+
78+
- All rules in the [docs guide]({{% ref contributing-docs.md %}}) should be followed in addition to these.
79+
- All files and directories should be prefixed with `dotnet-` to ensure all file/directory names are globally
80+
- unique across all Dapr documentation.
81+
82+
All pull requests should strive to include both XML documentation in the code clearly indicating what functionality
83+
does and why it's there as well as changes to the published documentation to clarify for other developers how your change
84+
improves the Dapr framework.
85+
86+
## GitHub Dapr Bot Commands
87+
88+
Checkout the [daprbot documentation](https://docs.dapr.io/contributing/daprbot/) for Github commands you can run in this repo for common tasks. For example,
89+
you can comment `/assign` on an issue to assign it to yourself.
90+
91+
## Commit Sign-offs
92+
All code submitted to the Dapr .NET SDK must be signed off by the developer authoring it. This means that every
93+
commit must end with the following:
94+
> Signed-off-by: First Last <flast@example.com>
95+
96+
The name and email address must match the registered GitHub name and email address of the user committing the changes.
97+
We use a bot to detect this in pull requests and we will be unable to merge the PR if this check fails to validate.
98+
99+
If you notice that a PR has failed to validate because of a failed DCO check early on in the PR history, please consider
100+
squashing the PR locally and resubmitting to ensure that the sign-off statement is included in the commit history.
101+
102+
# Languages, Tools and Processes
103+
All source code in the Dapr .NET SDK is written in C# and targets the latest language version available to the earliest
104+
supported .NET SDK. As of v1.16, this means that both .NET 8 and .NET 9 are supported. The latest language version available
105+
is [C# version 12](https://learn.microsoft.com/dotnet/csharp/whats-new/csharp-version-history#c-version-12)
106+
107+
Contributors are welcome to use whatever IDE they're most comfortable developing in, but please do not submit
108+
IDE-specific preference files along with your contributions as these will be rejected.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
type: docs
3+
title: "Dapr .NET SDK"
4+
linkTitle: ".NET"
5+
weight: 1000
6+
description: .NET SDK packages for developing Dapr applications
7+
no_list: true
8+
cascade:
9+
github_repo: https://github.com/dapr/dotnet-sdk
10+
github_subdir: daprdocs/content/en/dotnet-sdk-docs
11+
path_base_for_github_subdir: content/en/developing-applications/sdks/dotnet/
12+
github_branch: master
13+
---
14+
15+
Dapr offers a variety of packages to help with the development of .NET applications. Using them you can create .NET clients, servers, and virtual actors with Dapr.
16+
17+
## Prerequisites
18+
- [Dapr CLI]({{< ref install-dapr-cli.md >}}) installed
19+
- Initialized [Dapr environment]({{< ref install-dapr-selfhost.md >}})
20+
- [.NET 8](https://dotnet.microsoft.com/download) or [.NET 9](https://dotnet.microsoft.com/download) installed
21+
22+
## Installation
23+
24+
To get started with the Client .NET SDK, install the Dapr .NET SDK package:
25+
26+
```sh
27+
dotnet add package Dapr.Client
28+
```
29+
30+
## Try it out
31+
32+
Put the Dapr .NET SDK to the test. Walk through the .NET quickstarts and tutorials to see Dapr in action:
33+
34+
| SDK samples | Description |
35+
| ----------- | ----------- |
36+
| [Quickstarts]({{% ref quickstarts %}}) | Experience Dapr's API building blocks in just a few minutes using the .NET SDK. |
37+
| [SDK samples](https://github.com/dapr/dotnet-sdk/tree/master/examples) | Clone the SDK repo to try out some examples and get started. |
38+
| [Pub/sub tutorial](https://github.com/dapr/quickstarts/tree/master/tutorials/pub-sub) | See how Dapr .NET SDK works alongside other Dapr SDKs to enable pub/sub applications. |
39+
40+
## Available packages
41+
42+
| Package Name | Documentation Link | Description |
43+
|-----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
44+
| [Dapr.Client](https://www.nuget.org/packages/Dapr.Client) | [Documentation]({{% ref dotnet-client %}}) | Create .NET clients that interact with a Dapr sidecar and other Dapr applications. |
45+
| [Dapr.AI](https://www.nuget.org/packages/Dapr.AI) | [Documentation]({{% ref dotnet-ai %}}) | Create and manage AI operations in .NET. |
46+
| [Dapr.AI.A2a](https://www.nuget.org/packages/Dapr.AI.A2a) | | Dapr SDK for implementing agent-to-agent operations using the [A2A](https://github.com/a2aproject/a2a-dotnet) framework. |
47+
| [Dapr.AI.Microsoft.Extensions](https://www.nuget.org/packages/Dapr.AI.Microsoft.Extensions) | [Documentation]({{% ref dotnet-ai-extensions-howto %}}) | Easily interact with LLMs conversationally and using tooling via the Dapr Conversation building block. |
48+
| [Dapr.AspNetCore](https://www.nuget.org/packages/Dapr.AspNetCore) | [Documentation]({{% ref dotnet-client %}}) | Write servers and services in .NET using the Dapr SDK. Includes support and utilities providing richer integration with ASP.NET Core. |
49+
| [Dapr.Actors](https://www.nuget.org/packages/Dapr.Actors) | [Documentation]({{% ref dotnet-actors %}}) | Create virtual actors with state, reminders/timers, and methods. |
50+
| [Dapr.Actors.AspNetCore](https://www.nuget.org/packages/Dapr.Actors) | [Documentation]({{% ref dotnet-actors %}}) | Create virtual actors with state, reminders/timers, and methods with rich integration with ASP.NET Core. |
51+
| [Dapr.Actors.Analyzers](https://www.nuget.org/packages/Dapr.Actors.Analyzers) | [Documentation]({{% ref dotnet-guidance-source-generators %}}) | A collection of Roslyn source generators and analyzers for enabling better practices and preventing common errors when using Dapr Actors in .NET. |
52+
| [Dapr.Cryptography](https://www.nuget.org/packages/Dapr.Cryptography) | [Documentation]({{% ref dotnet-cryptography %}}) | Encrypt and decrypt streaming state of any size using Dapr's cryptography building block. |
53+
| [Dapr.Jobs](https://www.nuget.org/packages/Dapr.Jobs) | [Documentation]({{% ref dotnet-jobs %}}) | Create and manage the scheduling and orchestration of jobs. |
54+
| [Dapr.Jobs.Analyzers](https://www.nuget.org/packages/Dapr.Jobs.Analyzers) | [Documentation]({{% ref dotnet-guidance-source-generators %}}) | A collection of Roslyn source generators and analyzers for enabling better practices and preventing common errors when using Dapr Jobs in .NET. |
55+
| [Dapr.DistributedLocks](https://www.nuget.org/packages/Dapr.DistributedLocks) | [Documentation]({{% ref dotnet-distributed-lock %}}) | Create and manage distributed locks for managing exclusive resource access. |
56+
| [Dapr.Extensions.Configuration](https://www.nuget.org/packages/Dapr.Extensions.Configuration) | | Dapr secret store configuration provider implementation for `Microsoft.Extensions.Configuration`. |
57+
| [Dapr.PluggableComponents](https://www.nuget.org/packages/Dapr.PluggableComponents) | | Used to implement pluggable components with Dapr using .NET. |
58+
| [Dapr.PluggableComponents.AspNetCore](https://www.nuget.org/packages/Dapr.PluggableComponents.AspNetCore) | | Implement pluggable components with Dapr using .NET with rich ASP.NET Core support. |
59+
| [Dapr.PluggableComponents.Protos](https://www.nuget.org/packages/Dapr.PluggableComponents.Protos) | | **Note:** Developers needn't install this package directly in their applications. |
60+
| [Dapr.Messaging](https://www.nuget.org/packages/Dapr.Messaging) | [Documentation]({{% ref dotnet-messaging %}}) | Build distributed applications using the Dapr Messaging SDK that utilize messaging components like streaming pub/sub subscriptions. |
61+
| [Dapr.Workflow](https://www.nuget.org/packages/Dapr.Workflow) | [Documentation]({{% ref dotnet-workflow %}}) | Create and manage workflows that work with other Dapr APIs. |
62+
| [Dapr.Workflow.Analyzers](https://www.nuget.org/packages/Dapr.Workflow.Analyzers) | [Documentation]({{% ref dotnet-guidance-source-generators %}}) | A collection of Roslyn source generators and analyzers for enabling better practices and preventing common errors when using Dapr Workflows in .NET |
63+
64+
## More information
65+
66+
Learn more about local development options, best practices, or browse NuGet packages to add to your existing .NET
67+
applications.
68+
69+
<div class="card-deck">
70+
<div class="card">
71+
<div class="card-body">
72+
<h5 class="card-title"><b>Development</b></h5>
73+
<p class="card-text">Learn about local development integration options</p>
74+
<a href="{{% ref dotnet-integrations %}}" class="stretched-link"></a>
75+
</div>
76+
<div class="card">
77+
<div class="card-body">
78+
<h5 class="card-title"><b>Best Practices</b></h5>
79+
<p class="card-text">Learn about best practices for developing .NET Dapr applications</p>
80+
<a href="{{% ref dotnet-guidance %}}" class="stretched-link"></a>
81+
</div>
82+
</div>
83+
<div class="card">
84+
<div class="card-body">
85+
<h5 class="card-title"><b>NuGet packages</b></h5>
86+
<p class="card-text">NuGet packages for adding the Dapr to your .NET applications.</p>
87+
<a href="https://www.nuget.org/profiles/dapr.io" class="stretched-link"></a>
88+
</div>
89+
</div>
90+
</div>
91+
<br />

0 commit comments

Comments
 (0)