Skip to content

Commit 02fba71

Browse files
committed
update
1 parent 0d2badc commit 02fba71

2 files changed

Lines changed: 147 additions & 37 deletions

File tree

docs/.vuepress/components/ELSTechnology.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ const techData = [
10241024
ecosystemIcon: "/images/csharp.webp",
10251025
projects: [
10261026
{
1027-
name: ".NET Components",
1027+
name: ".NET",
10281028
versions: "6 | 8 | 10",
10291029
link: "./dotnet/",
10301030
},

docs/els-for-libraries/dotnet/README.md

Lines changed: 146 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# .NET components
1+
# .NET
22

3-
Endless Lifecycle Support (ELS) for .NET from TuxCare delivers security fixes for .NET components distributed through NuGet packages. This allows you to continue running your .NET applications without vulnerability concerns, even after official support has ended.
3+
Endless Lifecycle Support (ELS) for .NET from TuxCare delivers security fixes for .NET library, framework, and tool packages, distributed through NuGet packages. This allows you to continue running your .NET applications without vulnerability concerns, even after official support has ended.
44

55
NuGet is the standard package manager for .NET, used to deliver the reusable components applications depend on. ELS applies fixes at the package level, so your applications receive security updates without requiring changes to your own code.
66

@@ -10,20 +10,17 @@ NuGet is the standard package manager for .NET, used to deliver the reusable com
1010

1111
Other versions upon request.
1212

13-
## Connection to ELS for .NET components Repository
14-
15-
This guide outlines the steps needed to integrate the TuxCare ELS for .NET components repository into your .NET project.
16-
17-
### Prerequisites
13+
## Prerequisites
1814

1915
* .NET SDK installed. A TuxCare-supported .NET SDK build is also [available](/els-for-runtimes/dotnet/).
20-
* Access to the TuxCare NuGet repository (credentials required).
16+
* Access to the TuxCare .NET NuGet repository (credentials required).
17+
You need a username and password to use the TuxCare ELS for .NET repository. Anonymous access is disabled. To receive the credentials, please contact [sales@tuxcare.com](mailto:sales@tuxcare.com).
2118

22-
### Step 1: Get User Credentials
19+
## Adding the Repository
2320

24-
You need a username and password in order to use the TuxCare ELS for .NET components repository. Anonymous access is disabled. To receive the credentials, please contact [sales@tuxcare.com](mailto:sales@tuxcare.com).
21+
This section describes how to add the TuxCare ELS for .NET repository as a package source.
2522

26-
### Step 2: Add TuxCare NuGet Source
23+
### Adding the NuGet Source via CLI
2724

2825
Add the TuxCare NuGet repository as a package source using the `dotnet` CLI:
2926

@@ -40,6 +37,62 @@ dotnet nuget add source "https://nexus.repo.tuxcare.com/repository/els_dotnet/in
4037

4138
**Replace `<USERNAME>` and `<PASSWORD>` with the credentials provided by sales.**
4239

40+
### Adding the NuGet Source via nuget.config
41+
42+
As an alternative to the CLI, you can configure NuGet package sources using a `nuget.config` file. This approach is useful for sharing configuration across a team or for version-controlled source settings.
43+
44+
#### Understanding NuGet Configuration Hierarchy
45+
46+
NuGet configuration follows a hierarchy (from highest to lowest priority):
47+
48+
1. **Project-level**: `nuget.config` in your project folder
49+
2. **Solution-level**: `nuget.config` in the solution folder (parent directory)
50+
3. **User-level**: `~/.nuget/NuGet/NuGet.Config`
51+
4. **Machine-level**: `/etc/nuget/NuGet/NuGet.Config`
52+
53+
Settings in higher-priority files override those in lower-priority files.
54+
55+
#### Creating a nuget.config File
56+
57+
Create a `nuget.config` file in your project or solution directory:
58+
59+
<CodeWithCopy>
60+
61+
```
62+
<?xml version="1.0" encoding="utf-8"?>
63+
<configuration>
64+
<packageSources>
65+
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
66+
<clear />
67+
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
68+
<add key="TuxCare" value="https://nexus.repo.tuxcare.com/repository/els_dotnet/index.json" />
69+
</packageSources>
70+
</configuration>
71+
```
72+
73+
</CodeWithCopy>
74+
75+
In this configuration:
76+
77+
* The `<clear />` element removes inherited package sources, giving you full control.
78+
* The `nuget` source points to the official NuGet.org repository.
79+
* The `TuxCare` source points to the TuxCare ELS repository.
80+
81+
#### Adding Credentials for nuget.config
82+
83+
If your `nuget.config` requires authentication, you can add credentials using the CLI or by adding a `<packageSourceCredentials>` section to your `nuget.config`:
84+
85+
<CodeTabs :tabs="[
86+
{ title: 'CLI', content: 'dotnet nuget update source TuxCare --username <USERNAME> --password <PASSWORD>' },
87+
{ title: 'nuget.config', content: credsConfig }
88+
]" />
89+
90+
:::warning
91+
Avoid committing credentials to version control. Consider using environment variables or a separate local configuration file for sensitive information.
92+
:::
93+
94+
### Verifying the Source
95+
4396
To verify that the source was added successfully, list all configured NuGet sources:
4497

4598
<CodeWithCopy>
@@ -53,10 +106,18 @@ dotnet nuget list source
53106
Example output:
54107

55108
```text
56-
109+
Registered Sources:
110+
1. nuget.org [Enabled]
111+
https://api.nuget.org/v3/index.json
112+
2. TuxCare [Enabled]
113+
https://nexus.repo.tuxcare.com/repository/els_dotnet/index.json
57114
```
58115

59-
### Step 3: Navigate to Your Project
116+
## Working with Packages
117+
118+
This section explains how to install and use packages from the TuxCare repository.
119+
120+
### Navigating to Your Project
60121

61122
Ensure you are in a directory containing a valid .NET project. The folder must contain a `.csproj` file.
62123

@@ -68,7 +129,7 @@ dir *.csproj
68129

69130
</CodeWithCopy>
70131

71-
If a `.csproj` file is found, you can proceed with package installation. If not, you need to navigate to a valid .NET project directory or create a new project:
132+
If a `.csproj` file is found, you can proceed with package installation. If not, create a new project:
72133

73134
<CodeWithCopy>
74135

@@ -79,7 +140,7 @@ cd MyProject
79140

80141
</CodeWithCopy>
81142

82-
### Step 4: Install a Package
143+
### Installing Packages
83144

84145
Install a package from the TuxCare repository using the `dotnet add package` command:
85146

@@ -101,53 +162,59 @@ dotnet add package <PACKAGE_NAME> --version <VERSION>
101162

102163
</CodeWithCopy>
103164

104-
You can find a specific component version in your TuxCare account on [Nexus](https://nexus.repo.tuxcare.com/repository/els_dotnet/) (anonymous access is restricted).
105-
106-
### Step 5: Build the Project
107-
108-
After installing the package, verify that everything works correctly by building the project:
165+
For example:
109166

110167
<CodeWithCopy>
111168

112169
```text
113-
dotnet build
170+
dotnet add package Newtonsoft.Json --version 12.0.4-tuxcare-els
114171
```
115172

116173
</CodeWithCopy>
117174

118-
If the build completes successfully, the TuxCare package is successfullyintegrated into your project.
175+
**You can find available package versions in your TuxCare account on [Nexus](https://nexus.repo.tuxcare.com/repository/els_dotnet/) (anonymous access is restricted).**
119176

120-
## Managing NuGet Sources
177+
### Using Package Source Mapping
121178

122-
### Remove a Source
179+
If you use a `nuget.config` file, you can add package source mapping to route specific packages to the TuxCare feed. This ensures certain packages are always fetched from TuxCare while others come from NuGet.org.
123180

124-
If you need to remove the TuxCare source:
181+
Add a `<packageSourceMapping>` section to your `nuget.config`, for example, Newtonsoft.Json:
125182

126183
<CodeWithCopy>
127184

128-
```text
129-
dotnet nuget remove source TuxCare
185+
```
186+
<packageSourceMapping>
187+
<!-- Allow nuget.org to serve any package -->
188+
<packageSource key="nuget">
189+
<package pattern="*" />
190+
</packageSource>
191+
192+
<!-- Route specific packages to TuxCare feed -->
193+
<packageSource key="TuxCare">
194+
<package pattern="Newtonsoft.*" />
195+
</packageSource>
196+
</packageSourceMapping>
130197
```
131198

132199
</CodeWithCopy>
133200

134-
### Update Source Credentials
201+
**You can find available package versions in your TuxCare account on [Nexus](https://nexus.repo.tuxcare.com/repository/els_dotnet/) (anonymous access is restricted).**
135202

136-
To update the credentials for an existing source, remove and re-add the source:
203+
### Building the Project
204+
205+
After installing packages, verify that everything works correctly by building the project:
137206

138207
<CodeWithCopy>
139208

140209
```text
141-
dotnet nuget remove source TuxCare
142-
dotnet nuget add source "https://nexus.repo.tuxcare.com/repository/els_dotnet/index.json" `
143-
--name TuxCare `
144-
--username <NEW_USERNAME> `
145-
--password <NEW_PASSWORD>
210+
dotnet build
146211
```
147212

148213
</CodeWithCopy>
149214

150-
## Upgrading to a Newer TuxCare Version
215+
If the build completes successfully, the TuxCare package is successfully integrated into your project. Check the output folder to confirm that the package DLL (e.g., `Newtonsoft.Json.dll`) was downloaded from the TuxCare repository.
216+
217+
### Upgrading Packages
151218

152219
To upgrade to a newer TuxCare release, update the package in your project:
153220

@@ -167,4 +234,47 @@ Then rebuild the project to verify the upgrade:
167234
dotnet build
168235
```
169236

170-
</CodeWithCopy>
237+
</CodeWithCopy>
238+
239+
## Managing NuGet Sources
240+
241+
This section covers common tasks for managing the TuxCare NuGet source.
242+
243+
### Removing a Source
244+
245+
If you need to remove the TuxCare source:
246+
247+
<CodeWithCopy>
248+
249+
```text
250+
dotnet nuget remove source TuxCare
251+
```
252+
253+
</CodeWithCopy>
254+
255+
### Updating Source Credentials
256+
257+
To update the credentials for an existing source, remove and re-add the source:
258+
259+
<CodeWithCopy>
260+
261+
```text
262+
dotnet nuget remove source TuxCare
263+
dotnet nuget add source "https://nexus.repo.tuxcare.com/repository/els_dotnet/index.json" `
264+
--name TuxCare `
265+
--username <NEW_USERNAME> `
266+
--password <NEW_PASSWORD>
267+
```
268+
269+
</CodeWithCopy>
270+
271+
<script setup>
272+
273+
const credsConfig =
274+
`<packageSourceCredentials>
275+
<TuxCareProd>
276+
<add key="Username" value="username" />
277+
<add key="Password" value="passwordHash" />
278+
</TuxCareProd>
279+
</packageSourceCredentials>`
280+
</script>

0 commit comments

Comments
 (0)