xamarin-forms-docs/knowledge-base/common-nuget-config.md

70 строки
2.4 KiB
Markdown
Исходник Постоянная ссылка Обычный вид История

2019-06-19 10:42:21 +03:00
---
title: How to configure Nuget.config file to use Теlerik Nuget Server within Xamarin app
description: Explain how to set credentials to Telerik Nuget Server in Nuget.config file to build in AppCenter
type: how-to
page_title: How to build Xamarin.Forms project with Telerik Xamarin nuget package in AppCenter
slug: common-nuget-config
position:
2019-08-19 16:04:49 +03:00
tags: configure, nuget, telerik, server, app, how-to, credentials, set, AppCenter, Xamarin, XamarinForms
2019-06-19 10:42:21 +03:00
ticketid: 1096817
res_type: kb
---
## Environment
<table>
<tbody>
<tr>
<td>Product Version</td>
<td>2019.2.603.1</td>
</tr>
<tr>
<td>Product</td>
<td>Telerik UI for Xamarin</td>
</tr>
</tbody>
</table>
## Description
2019-08-06 15:28:59 +03:00
2019-06-19 10:42:21 +03:00
Telerik UI for Xamarin Nuget package is hosted on a private server, it is not published in the official NuGet storage. So, when you're building a Xamarin.Forms application with our Xamarin nuget package in AppCenter, you would need to provide the credentials to the Telerik Nuget Server (they are the same as in your Telerik account) inside a Nuget.config file.
2021-09-10 11:44:22 +03:00
>tip The improved Telerik NuGet Server v3 is now available for beta testing at https://nuget.telerik.com/v3/index.json. The new v3 API is faster, lighter, and reduces the number of requests from NuGet clients. You are welcome to try it. For authentication use the same credentials
2019-06-19 10:42:21 +03:00
## Solution
2019-08-06 15:28:59 +03:00
2019-06-19 10:42:21 +03:00
You could check how to setup the Nuget.config file in the MSDN topic below:
https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file#package-source-sections
The tricky part is that you'd need to use **ClearTextPassword** field for the credentials.
Here is an example with setting up Telerik Nuget Server in Nuget.config:
```XML
<packageSources>
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="Telerik" value="https://nuget.telerik.com/nuget" />
</packageSources>
<packageSourceCredentials>
<Telerik>
<add key="Username" value="%TELERIK_USERNAME%" />
<add key="ClearTextPassword" value="%TELERIK_PASSWORD%" />
</Telerik>
</packageSourceCredentials>
2021-09-10 11:44:22 +03:00
```
and if you want to use the beta server:
```XML
<packageSources>
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="Telerik" value="https://nuget.telerik.com/v3/index.json" />
</packageSources>
<packageSourceCredentials>
<Telerik>
<add key="Username" value="%TELERIK_USERNAME%" />
<add key="ClearTextPassword" value="%TELERIK_PASSWORD%" />
</Telerik>
</packageSourceCredentials>
```