title | page_title | description | tags | slug | position |
---|---|---|---|---|---|
Using NuGet.Config |
Using NuGet.Config |
Install the Telerik UI for .NET MAUI Controls by using the Nuget.Config file to set up the NuGet source. |
maui, dot net maui, microsoft maui, telerik maui, nuget, ui for .net maui controls, windows, mac, install, telerik .net maui, visual studio |
nuget-config |
5 |
An alternative way to configure your system to use the Telerik NuGet server is to directly edit the nuget.config
file. This approach is useful if you don't have Visual Studio installed.
To configure the Telerik NuGet server as a package source directly in the nuget.config
file, perform the following steps:
Generate a NuGet API key that you will use for the authentication by the Telerik NuGet server. This approach is more secure than using your Telerik credentials in plain text.
-
Go to the
NuGet.Config
file:- On Windows, open the
%AppData%\NuGet\NuGet.Config
file. - On Mac, open either the
~/.config/NuGet/NuGet.Config
or~/.nuget/NuGet/NuGet.Config
file (varies by tooling).
If the file doesn't exist on your machine, create it by running the
dotnet new nugetconfig
command in the terminal. For more information about the command, see Microsoft's docs. - On Windows, open the
-
In the
nuget.config
file, add the Telerik feed by inserting the line<add key="MyTelerikFeed" value="https://nuget.telerik.com/v3/index.json" protocolVersion="3"/>
in thepackageSources
section. -
In the
packageSourceCredentials
section, add the generated NuGet API key. Useapi-key
as a value for the user name.<configuration> <packageSources> <clear/> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> <add key="MyTelerikFeed" value="https://nuget.telerik.com/v3/index.json" protocolVersion="3"/> </packageSources> <packageSourceCredentials> <MyTelerikFeed> <add key="Username" value="api-key" /> <add key="ClearTextPassword" value="%MY_API_KEY%" /> </MyTelerikFeed> </packageSourceCredentials> </configuration>
This article does not cover the scenario of using your Telerik account credentials as plain text in the NuGet.Config
file due to security concerns. However, you can still use the plain text approach if you must.
warning
- Never hard-code Telerik account credentials or NuGet API keys in a
NuGet.Config
file in a GitHub repository, Docker image, or any location that may be accessed by unauthorized parties. A NuGet key is valuable and bad actors can use it to access the NuGet packages that are licensed under your account. A credentials abuse can lead to a review of the affected Telerik account.- If you use single sign-on (SSO) to login into your Telerik account, always use a [NuGet API key]({%slug nuget-keys%}) instead of plain text credentials in the
NuGet.Config
file.
For more details about the NuGet.Config
file, see the following Microsoft resources:
- [Troubleshooting Common NuGet Setup Issues]({%slug nuget-troubleshooting%})
- [Using the Telerik NuGet Sever as Part of Your CI Workflow]({%slug nuget-keys%})